Rev 1 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php/*QBPWCF, Quick Build PHP website Component base on Fedora Linux.Copyright (C) 2014~2025 Min-Jhin,ChenThis file is part of QBPWCF.QBPWCF is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 3 of the License, or(at your option) any later version.QBPWCF is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with QBPWCF. If not, see <http://www.gnu.org/licenses/>.*/#使用命名空間qbpwcfnamespace qbpwcf;#assets dir$assetsDir="assets of fileAccess::validatePath_20250429";#函式說明:#確保路徑存在.#回傳結果:#$result["status"],執行正常與否,"true"代表正常,"false"代表不正常.#$result["error"],錯誤訊息陣列.#$resutl["function"],當前執行的涵式名稱.#$result["path"],建立好的路徑字串.#$result["fileName"],檔案名稱,若 $conf["haveFileName"] 為 "true" 則會回傳.#$result["argu"],使用的參數.#必填參數:#$conf["path"],要檢查的路徑$conf["path"]="'".$assetsDir."/qbpwcf-usock.sock'";#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑$conf["fileArgu"]=__FILE__;#可省略參數:#$conf["haveFileName"],字串,"true"代表有$conf["path"]檔案名稱,"false"代表$conf["path"]為純路徑,預設為"false".#$conf["haveFileName"]="false";#$conf["dirPermission"],字串,新建資料夾的權限設定,預設爲0770,亦即擁有者,同群組者可以讀,寫,存取,其他人無法使用.#$conf["dirPermission"]="";#$conf["web"],是否為檔案系統,"true"為網頁路徑,"false"為網頁系統,預設為"false".#$conf["web"]="";#參考資料:#無.#備註:#無.$validatePath=fileAccess::validatePath($conf);unset($conf);#debugvar_dump($validatePath);