2014-01-14 106 views
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 

我使用这个文件。公司对我的PHP页面链接到MySQL但我的浏览器说以下消息:没有这样的文件目录吗?

Warning: require_once(../FinalApplicationDWP/Public_html/dbstuff.inc): failed to open stream: No such file or directory in /home/cs12jkk/public_html/functions.inc on line 6 

Fatal error: require_once(): Failed opening required '../FinalApplicationDWP/Public_html/dbstuff.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cs12jkk/public_html/functions.inc on line 6 

我filies在保存上文件在我的桌面上FinalApplicationDWP> public_html>然后所有文件

<?php 

require_once ("..dbstuff.inc"); 
require_once ("validation.inc"); 

?> 

<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<title>Untitled Document</title> 
</head> 

<body> 
</body> 
</html> 

回答

1

它不在require_once行中找到该文件。

对于初学者尝试:

require_once ("../dbstuff.inc"); 

注意额外的/

除此之外检查文件路径,确保他们在正确的位置。

+0

改变<"..dbstuff.inc">文件的正确的道路只是去尝试,仍然得到同样的错误消息,感谢尝试虽然:) – user3192530

+0

尝试一个完全合格的路径,而不是相对一个 – FaddishWorm

0

试着改变你的代码::

<?php 

require_once("file:///jordanking48$/Users/jordanking48/Desktop/FinalApplicationDWP/public_html/dbstuff.inc"); 
require_once ("validation.inc"); 

?> 

<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<title>Untitled Document</title> 
</head> 

<body> 
</body> 
</html> 

,并确保你GICE到<"../dbstuff.inc">

+0

如何检查/更改路径?我已更改为代码,并且仍然在Web浏览器中收到相同的错误消息。 – user3192530

+0

做1件事,检查只是给完整的路径作为文件://c:/user/{/FinalApplicationDWP/Public_html/dbstuff.inc并检查是否它正在采取 –

+0

我只是复制你刚才给出的代码?我在哪里放置它来检查? – user3192530

相关问题