2019-05-01 15:50
浏览 93


This question already has an answer here:

so on my Ubuntu 16.04 server, i have a couple of .php files in my /var/www/html/ directory which i do regular php stuff such as data retrieval, user login... etc. I wanted to implement a mail verification service in which i wanted to use the gmail smtp service, so i installed mail through pear by the following command:

pear install --alldeps Mail

After following the steps in this website, i restarted apache2 and now my php require_once isn't working. I tried include_path which also didn't work.

I uninstalled mail by pear uninstall mail, deleted php and reinstalling it hoping it would get the files back as it was but no luck, does anyone know what happened and how can i fix it?

sample code: require_once 'DbOperation.php';

The above code worked and i want it to work as it is the key to my entire php api, please dont suggest a workaround. Any help is appreciated.


图片转代码服务由CSDN问答提供 功能建议

此问题已经存在 这里有一个答案:

  • 如何在PHP中获取有用的错误消息? 26个答案\ r

    所以在我的Ubuntu 16.04服务器上,我有几个 我的/ var / www / html /目录中的.php文件,我做常规的PHP内容,如数据检索,用户登录等等。我想实现一个邮件验证服务,我想在其中使用gmail smtp服务, 所以我通过以下命令通过pear安装邮件:

      pear install --alldeps Mail 

    以下 这个网站,我重新启动了apache2,现在我的php require_once无效。 我尝试了include_path也没有用。

    我通过 pear卸载邮件卸载邮件,删除了php并重新安装它希望它能将文件恢复原样 但是没有运气,有谁知道发生了什么以及如何解决?

    示例代码: require_once'DbOperation.php'; \ n

    以上代码有效,我希望它能够工作,因为它是我整个php api的关键,请不要建议解决方法。 任何帮助表示赞赏。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

  • duanjing3656 2019-05-01 16:38

    Nothing in what you've tried should be causing require or require_once to suddenly stop working. Make sure you have all error reporting turned on:


    With error reporting enabled you may spot a problem with something else (like the code that is being required).

    解决 无用
    打赏 举报

相关推荐 更多相似问题