【问题标题】:PHP require_once(): Failed opening required include_pathPHP require_once():打开所需的 include_path 失败
【发布时间】:2018-05-27 01:18:32
【问题描述】:

我在 windows 中使用 PHP 7.1。

我得到的错误:

PHP 致命错误:require_once():在 D:\Ampps\www\Suite_dev 中打开所需的 'Suite_dev/service/v4_1/SugarWebServiceImplv4_1.php' (include_path='D:/Ampps/php-7.1/pear') 失败\custom\service\v4_1_custom\SugarWebServiceImplv4_1_custom.php 在第 4 行

解决方法我在 php ini 文件中做了:

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

下载并安装了php pear,测试pear运行正常。

即使安装了 pear,我仍然遇到上述错误。

还尝试过类似的方法:

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

我仍然得到同样的错误。

【问题讨论】:

    标签: php pear


    【解决方案1】:

    Sugar 中的包含通常是基于 Sugar 主文件夹的相对路径。

    应该如此 service/v4_1/SugarWebServiceImplv4_1.php 没有前导Suite_dev/

    【讨论】:

    • 我的实际路径与你给出的相同......因为它有效,我尝试了我展示的方式!在这两种情况下,我都得到了上述错误
    • PS:对于 Sugar 开发(以及生产),我强烈建议使用 Linux 而不是 Windows。
    • @stack200s 然后也许 SuiteCRM 改变了他们的目录布局或其他东西。您使用的是哪个版本的 SuiteCRM?您尝试包含的文件是否确实存在?
    • 我使用的是 7.8.8,在 linux 中它会导致更多问题,正如他们在社区中发布的那样
    猜你喜欢
    • 2014-02-02
    • 2016-06-29
    • 2011-04-21
    • 2020-02-14
    • 2014-06-12
    • 2014-05-09
    • 1970-01-01
    • 2014-03-05
    相关资源
    最近更新 更多