PHP / MySQL:路径错误:[function.require]:无法打开流:

问题描述:

I have applied the google map to my local server via Xampp. I have moved it to my web hosting server and I can not get it to connect to the databse. I was able to get other db connections to work but the issue here is I must be puting the file path in incorrectly. I am using the same file structure as on my local machine.

The Errors:

Warning: require(../includes/core/db/map_dbinfo.php) [function.require]: failed to open stream: No such file or directory in /home/xxxxxxx/public_html/includes/state_map/phpsqlajax_genxml2.php on line 2

Fatal error: require() [function.require]: Failed opening required '../includes/core/db/map_dbinfo.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxxx/public_html/includes/state_map/phpsqlajax_genxml2.php on line 2

Anyone know why it's throwing these errors now but not on local machine and how I can go about fixing it?

I really have no idea where to start or even how to word this question. Any help would be appreciated. Thanks

我已经通过Xampp将谷歌地图应用到我的本地服务器。 我已将其移至我的网络托管服务器,我无法将其连接到数据库。 我能够让其他数据库连接工作但这里的问题是我必须错误地放置文件路径。 我使用与本地计算机相同的文件结构。 p>

错误: p>

 警告:require(../ includes /  core / db / map_dbinfo.php)[function.require]:无法打开流:第2行的/home/xxxxxxx/public_html/includes/state_map/phpsqlajax_genxml2.php中没有这样的文件或目录
 
Fatal error:require(  )[function.require]:在/ home中打开所需的'../includes/core/db/map_dbinfo.php'(include_path ='。:/ usr / lib / php:/ usr / local / lib / php')失败 第2行上的/xxxxxxx/public_html/includes/state_map/phpsqlajax_genxml2.php 
  code>  pre> 
 
 

任何人都知道它为什么现在抛出这些错误而不是本地机器上的错误以及我怎么去 关于修理它? p>

我真的不知道从哪里开始,甚至不知道怎么说这个问题。 任何帮助,将不胜感激。 谢谢 p> div>

You are standing in .../includes/states_map/phpsqlajax_genxml2.php and trying to reach "../includes/core/db/map_dbinfo.php". If you go back one directory from states_map you get to includes, and then you try to find includes under the includes directory.

Change the include to ../../includes/core/db/map_dbinfo.php

Why this is happening? Probably because you on your local server has .../includes added in you r include_path in php, which then will try includes/../includes/...