在网站根目录的index.php文件里
define('BASE_PATH',str_replace('\\','/',realpath(dirname(__FILE__).'/'))."/");
然后在其他文件就可以获取了
echo BASE_PATH;
zonglonglong 2016-12-08 11:02 原文
在网站根目录的index.php文件里
define('BASE_PATH',str_replace('\\','/',realpath(dirname(__FILE__).'/'))."/");
然后在其他文件就可以获取了
echo BASE_PATH;