设置Include_Path

设置include_path时候需要区分平台,windows下分隔符是'‘;’',Linux平台下是'‘:’'。分隔符在PHP中有内置常量:PATH_SEPARATOR。 Windows:

set_include_path('/home/mysite/includes1''';'''/home/mysite/includes2') 

Linux:

set_include_path('/home/mysite/includes1''':'''/home/mysite/includes2') 

也可以用函数ini_set('include_path', '<string>')来设置。

php/set_include_path.txt · 最后更改: 2010/04/30 15:37 由 admin
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki