包含php文件的另外一种方法

By SuperTaoer | 七月 6, 2005
Under: 程序 技术 周边
Views:

预定义包含php文件
可以在写程序的时候不用再include(“/path/filename”);
直接include(“filename”);
就可以了。。。

提供了很大的方便

一种方法是在php.ini中设置include_path项

还可以这么用在apache的配置文件中加入:

php_value include_path “.:/home/include”

如果在虚拟站点的配置里面写入
php_value include_path “.:/home/include”
则可以为不同的虚拟站点包含不同的目录

差..好文!! (还没评价)
Loading ... Loading ...

Leave a Message

No Messages

No Messages

RSS feed for comments on this post. TrackBack URI

Leave a Message