gpt4 book ai didi

php - PHP 的 set_include_path 的 "Starting Point"是什么

转载 作者:可可西里 更新时间:2023-11-01 01:10:35 24 4
gpt4 key购买 nike

在 PHP 中,set_include_path 相对于什么?它是 PHP.exe 所在的文件夹吗?是网盘吗?换句话说,set_include_path('/') 或 set_include_path('.') 指的是什么文件夹?

最佳答案

相对路径从文件的位置解析,其中 include 或使用 include_path 的另一个函数用于(参见 description of include_path):

Using a . in the include path allows for relative includes as it means the current directory. However, it is more efficient to explicitly use include './file' than having PHP always check the current directory for every include.

/ 将描述文件系统的根目录和 . 当前目录。

关于php - PHP 的 set_include_path 的 "Starting Point"是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2186244/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com