您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

get_include_path 函数的问题

2025/12/21 14:32:38发布20次查看
我在使用
get_include_path 函数时,出现的字符串如下:
.;c:\php\pear
请解释这个函数为什么会返回这个字符串??
这些字符串分别代表什么含义??
谢谢。
回复讨论(解决方案) 对应的函数是set_include_path() 设置某个目录为自动包含路径,这样这个目录下的文件,你可以直接include 而不需要写路径了
get_include_path() 获取当前的环境变量,取php.ini里设置的 include_path路径
返回的是 php.ini 中 include_path 设定的值
.;c:\php\pear 的含义是:
. 从当前目录检查被包含的文件是否存在
c:\php\pear 从 c:\php\pear 目录检查被包含的文件是否存在
分号表示并列的意思,小学语文就讲授了
; unix: /path1:/path2
;include_path = .:/php/includes
;
; windows: \path1;\path2
;include_path = .;c:\php\includes
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product