PHP require_once(): Failed opening required include_path

梦想与她 提交于 2019-12-11 14:49:23

问题


Im using Php 7.1 in windows.

Error i get:

PHP Fatal error: require_once(): Failed opening required 'Suite_dev/service/v4_1/SugarWebServiceImplv4_1.php' (include_path='D:/Ampps/php-7.1/pear') in D:\Ampps\www\Suite_dev\custom\service\v4_1_custom\SugarWebServiceImplv4_1_custom.php on line 4

Workaround i did in php ini file:

; Windows: "\path1;\path2"
include_path = "{$path}\php-7.1\pear"

Downloaded and installed php pear and tested pear is working.

Even after pear is installed, i still get above error.

Also tried something like:

include('../../../service/v4_1/SugarWebServiceImplv4_1.php');

Still i get the same error.


回答1:


includes in Sugar are usually relative paths based on Sugar's main folder.

So should be service/v4_1/SugarWebServiceImplv4_1.php without a leading Suite_dev/



来源:https://stackoverflow.com/questions/47788138/php-require-once-failed-opening-required-include-path

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!