【问题标题】:Path to a folder that is outside the current folder当前文件夹之外的文件夹的路径
【发布时间】:2019-02-01 03:36:03
【问题描述】:

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

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

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

【问题讨论】:

  • 向我们显示完整的错误消息。

标签: php path directory


【解决方案1】:

你应该使用:

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

或完整的绝对路径。

您正在使用的是试图从

检索文件

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

【讨论】:

    猜你喜欢
    • 2012-01-27
    • 2014-01-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-21
    • 1970-01-01
    • 1970-01-01
    • 2017-08-05
    相关资源
    最近更新 更多