[英]php: error importing file, no matter which path i use: absolute/“dotDOTslash”, i get an error saying the file doesn't exist, but it does exist, wtf?
okay so as the question says: i'm including files in a file, but i keep getting "no such file or directory" errors. 好的,正如问题所言:我正在将文件包含在文件中,但是我不断收到“无此文件或目录”错误。 and it really doesn't make sense to me, because i've checked them, i've checked their permissions and they're the same as those that i can include in other scripts
对我来说这真的没有意义,因为我已经检查了它们,检查了它们的权限,并且它们与我可以包含在其他脚本中的相同
just so you know: these includes are being made by a file that is being included within another 请注意:这些包含是由另一个文件中包含的文件完成的
ie: login.php - includes - check_login.php (which is the file that yields these errors) 即:login.php-包括-check_login.php(产生这些错误的文件)
here are my current includes: 这是我目前的包括:
include('/home/user/public_html/taxnetwork.co.za/main/db/select_all.php');
require_once('input_cleaner.php');
include('/home/user/public_html/taxnetwork.co.za/main/db/insert.php');
require_once('/home/user/public_html/taxnetwork.co.za/main/mail/mailer.php');
and these are the errors i'm getting: 这些是我得到的错误:
Warning: require_once(./db/insert.php) [function.require-once]: failed to open stream: No such file or directory in /home/user/public_html/taxnetwork.co.za/main/mail/mailer.php on line 2
Fatal error: require_once() [function.require]: Failed opening required './db/insert.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user/public_html/taxnetwork.co.za/main/mail/mailer.php on line 2
as warning say - you have the problem in 如警告说-你有问题
/home/user/public_html/taxnetwork.co.za/main/mail/mailer.php on line 2
then look in it and you will see there require_once(./db/insert.php)
you can change it to: 然后查看一下,您将看到
require_once(./db/insert.php)
可以将其更改为:
require_once('/home/user/public_html/taxnetwork.co.za/main/db/insert.php')
or to : 或者 :
require_once(realpath(dirname(__FILE__).'/../../').'/db/insert.php')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.