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

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

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100