在php http://php.net/manual/en/ini.core.php#ini.include-path中
示例1 Unix include_path
include_path=".:/php/includes".是指当前目录,:在这里意味着什么?
示例2 Windows include_path
include_path=".;c:\php\includes".是指当前目录,;在这里意味着什么?
发布于 2015-06-15 01:51:43
它是路径分隔符,在PHP中可以通过PATH_SEPARATOR常量访问。无论操作系统如何,都可以扩展包含路径。它可以用于autoload(PHP):
define("APPLICATION_PATH",realpath("."));
$include_path = array(
APPLICATION_PATH,
realpath(APPLICATION_PATH."/controller"),
get_include_path()
);
set_include_path(implode(PATH_SEPARATOR,$include_path));发布于 2015-06-15 01:53:41
是路径分离器。若要将目录添加到包含路径,可以使用以下语法作为引用的这里
$path = '/usr/lib/pear';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);https://stackoverflow.com/questions/30836228
复制相似问题