Home >php教程 >php手册 >php中定义网站根目录的常用方法

php中定义网站根目录的常用方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:34:54980browse

php中一般需要定义网站的根目录,下面是常用的代码,需要朋友可以参考下。

复制代码 代码如下:


define('BASE_PATH',str_replace('\\','/',realpath(dirname(__FILE__).'/../')));

,美国服务器,香港服务器,美国服务器
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn