doujiebo9849 2013-07-07 20:07
浏览 57
已采纳

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

  • 写回答

1条回答 默认 最新

  • dqf67993 2013-07-07 20:15
    关注

    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/...

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?