gpt4 book ai didi

php - 包括(): Failed to open stream: No such file or directory

转载 作者:可可西里 更新时间:2023-10-31 22:42:15 24 4
gpt4 key购买 nike

这可能只是一个非常愚蠢的问题,但我对它不起作用感到非常沮丧。我有一个家庭文件 (home.php)其中包含 <? include ("/production/fetch_order.php"); ?> .可以看出,我正在尝试从 home.php 访问一个文件。该文件名为 fetch_order.php在生产文件夹中。我的路径是正确的,拼写也绝对正确。但是我最终遇到了这个错误:

Warning: include(/production/fetch_order.php) [function.include]: 
failed to open stream: No such file or directory in /path/to/home.php on line 119

Warning: include() [function.include]: Failed opening '/production/fetch_order.php'
for inclusion (include_path='.:/path/to/php/php5.3.6/lib/php') in
/path/to/home.php on line 119

最佳答案

您在行的开头使用了绝对路径 (/),您需要删除该斜线,这将是一个相对路径,例如:

production/fetch_order.php

添加斜杠时,从系统根目录开始,没有斜杠,则在当前目录中查找。

关于php - 包括(): Failed to open stream: No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9557945/

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