+ -
当前位置:首页 → 问答吧 → php set_include_path 疑惑

php set_include_path 疑惑

时间:2011-11-02

来源:互联网

1.假设在 include/目录里有config.php文件
2.如果用set_include_path('../include')后
3.想再index.php用config的东西只要include('config.php') 就可以了。

疑问:那我在其他页面只需include('config.php'),还是set_include_path('../include')在include('config.php')呢?
他不可以跨页面,或者跨目录吗?

作者: hxl5u   发布时间: 2011-11-02

PHP code
include'../config.php'//当前目录的上级里面有config.php文件

作者: talent1314   发布时间: 2011-11-02