dongtiao5094 2011-04-22 08:41
浏览 92
已采纳

PHP include_path - 将其设置为空字符串不起作用

I have Apache HTTP Server v2.2 with PHP in FastCGI communication.

I tried to edit the include_path variable in php.ini to an empty string but it didn't work, the path remains: .:/usr/local/lib/php (as seen by phpinfo()).
If I set the include path to a colon (:), then the include path finally changes.

How can I set it to an empty string?

Thank you.

  • 写回答

2条回答 默认 最新

  • douzao9845 2011-04-22 08:51
    关注

    The value has to be something besides an empty string. If you don't want PHP to include anything from anywhere, you can set it to some nonexistent path (and let it fail to find the path when it tries to include stuff). It's not an ideal solution, but it'll work.

    I have a feeling you're going about this wrong, though. include_path is extremely useful, unless you intend to hard-code your app's path everywhere (which is a bad idea in itself, IMO). If you set it to just ., that should be enough to get rid of paths that shouldn't be in there, while keeping it practical to include stuff.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比