Thinkphp 控制器php 獲取根目錄

1、在Application-->Common-->function.php加入: function getRoot($file){ $fileUrl=str_replace('\\','/',realpath(dirname($file).'/'))."/"; $genIndex=strpos($fileUrl,'/Application/'); if($genIndex>0){ $rootPa
相關文章
相關標籤/搜索