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

标签 php

在 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/

相关文章:

javascript - 文本区域发布已通过,但表单内的数据未通过

php - 如何根据星级过滤mysql数据库中的用户

php - 流明/Laravel : Can't figure out how unittesting a json response works

php - 如何将一个数组键值与另一个数组索引值进行比较?

php - Mysql Php 使用 real_escape_string 转义单引号

php - 将值从数组传递到对象? - PHP

php - 仅允许某些域能够加载 iFrame

php - 使用工厂单元测试 Zend Framework 2 模块

PHP 代码在本地运行但不能在 Azure 上运行

php - 为什么 PHP 将上传的文件存储在临时位置,有什么好处?