Thinkphp 控制器php 获取根目录

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