douzhang3356 2015-12-31 10:51
浏览 52

理解include_path输出PHP

I need help in understanding include_path and where it is set. When I echo include path this is what I see:

.:/Applications/XAMPP/xamppfiles/lib/php

From what I understand there are two paths currently in the include_path separated by colon. First one is the

'.' which indicates the current directory
and the second one is the path
'/Applications/XAMPP/xamppfiles/lib/php'

So my questions are:

1) Is the above understanding correct?
2) Where is the include_path set because I looked at my php.ini file  in /Applications/XAMPP/xamppfiles/etc but I couldn't find this being mentioned in the file

This is what my php.ini had and the same seems to be commented:

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"

Also including my phpinfo output

Configuration File (php.ini) Path   /Applications/XAMPP/xamppfiles/etc
Loaded Configuration File   /Applications/XAMPP/xamppfiles/etc/php.ini
Scan this dir for additional .ini files     (none)
Additional .ini files parsed    (none) 
  • 写回答

2条回答 默认 最新

  • dongliao4353 2015-12-31 11:04
    关注
    1. Yes
    2. In php.ini like you thought. Use phpinfo(); to see what configuration files gets loaded. There could be additional php.ini files or this is not correct php.ini file loaded. Also, it can be easily changed from PHP code, .htaccess files etc.

    In phpinfo() output, search for Loaded Configuration File and Additional .ini files parsed.

    From command line, use command php -i to get php info.

    评论

报告相同问题?

悬赏问题

  • ¥15 救!ENVI5.6深度学习初始化模型报错怎么办?
  • ¥30 eclipse开启服务后,网页无法打开
  • ¥30 雷达辐射源信号参考模型
  • ¥15 html+css+js如何实现这样子的效果?
  • ¥15 STM32单片机自主设计
  • ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢
  • ¥15 不小心不正规的开发公司导致不给我们y码,
  • ¥15 我的代码无法在vc++中运行呀,错误很多
  • ¥50 求一个win系统下运行的可自动抓取arm64架构deb安装包和其依赖包的软件。
  • ¥60 fail to initialize keyboard hotkeys through kernel.0000000000