如何更改php.ini文件中的include_path


How to change include_path in php.ini file?

我尝试了很多方法,但都没能做出改变。,

我想这样更改include_path:

include_path = "c:'path'to'my'folder'file"

但是在尝试使用get_include_path()打印包含路径时它的打印是这样的:

'.;C:'php'pear'

有人能帮我吗?我也尝试了set_include_path,但对我不起作用。

如果你想更改php.ini文件中的包含路径,只需搜索include_path,你应该会找到这样的东西:

; Windows: "'path1;'path2"
include_path=".;C:'xampp'php'PEAR"

现在你可以在这里更改它并重新启动服务器,它应该可以工作了!

旁注:

我建议您在更改php.ini文件中的内容之前先做一个保存副本

有关include_path字符串的更多信息,请参阅手册:http://php.net/manual/en/ini.core.php#ini.include-路径