当前文件夹之外的文件夹的路径

时间:2018-08-26 09:47:49

标签: php path directory

我在 jobLister / jobs / pakistan / chemical / index.php 中有一个index.php文件,我想在index.php中包含一个文件,该文件的位置为jobLister / config / init。 php。

我尝试使用../config/init.php,但这不起作用。

我得到的错误:  C:\ wamp64 \ www \ jobLister \ jobs \ pakistan \ Chemical \ index.php中没有这样的文件或目录

1 个答案:

答案 0 :(得分:3)

您应该使用:

../../../config/init.php

或完整的绝对路径。

您使用的是尝试从

检索文件

obLister/jobs/pakistan/config,因此是错误

相关问题