PHP函数set_include_path的一点疑问
天蓬老师
天蓬老师 2017-04-10 14:24:25
0
2
451

set_include_path(get_include_path() . P_S . '.' . P_S . $siteConf['baseDir']);
set_include_path(get_include_path() . P_S . '.' . P_S . $siteConf['libDir']);
set_include_path(get_include_path() . P_S . '.' . P_S . $siteConf['baseDir'] . 'app');

代码如上,P_S即PATH_SEPARATOR

问题:
为什么每个路径前都要加'.'这个呢?

我查了下手册,在评论中有这么一个,这说明加它还是有必要的,但是原因还是未知....

joel at pittet dot ca17-Nov-2010 02:46

Seems set_include_path wasn't working for me.

The problem was i didn't have .: in my include_path
Which seemed to stop the set_include_path().

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!