我正在做一个项目,以移动优化一个汽车经销商网站。问题是,我们无法直接访问他们的MySQL数据库(他们没有应用程序接口)来动态生成页面。
我想要做的是PHP包含他们的页面,即使我得到这个错误:
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/content/88/8653188/html/campaigns/summumauto/index.php on line 10
Warning: include(http://www.summumauto.com/en/usedcars/listing/details.spy?id=4745209) [function.include]: failed to open stream: no suitable wrapper could be found in /home/content/88/8653188/html/campaigns/summumauto/index.php on line 10
Warning: include() [function.include]: Failed opening 'http://www.summumauto.com/en/usedcars/listing/details.spy?id=4745209' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/88/8653188/html/campaigns/summumauto/index.php on line 10然后,我想使用我自己的样式表来积极地处理页面的CSS,以便正确地将页面变形为移动友好的页面。
有没有什么变通的方法可以让这成为可能,或者我完全卡住了?
提前感谢:)
发布于 2012-09-25 00:17:10
您需要将allow-url-include配置选项设置为true,以便上面的代码正常工作。
发布于 2012-09-25 00:17:40
您应该能够使用curl functions来避免这个错误。
另一方面,如果可以配置服务器,就可以允许包含URL(可能是file_get_contents over include),但这可能会打开安全漏洞
https://stackoverflow.com/questions/12568891
复制相似问题