无法打开流:找不到合适的包装器 [英] failed to open stream: no suitable wrapper could be found
问题描述
您好,我正在将php文件从一个网站实施到另一个网站,这是以下错误消息,当我尝试使用已实现的php文件打开以下页面时,我会收到以下消息:
hello i am implementing php files from one website into another and here is the following error message i am getting when trying to open the following page with implemented php files:
http://www.holidaysavers.ca/europe-destinations-canada.php
基本上,我从一个网站导入到另一个网站的php文件是相同的,但是它们可以在原始网站上工作,但是当我将其实现到新网站时,它不再起作用.
basically the php files i am importing from one website into another are identical , however they work on the original website but when i implement them into a new website it does not work anymore.
您能协助我解决这个问题吗?
could you assist me in trying to get this resolved?
谢谢
推荐答案
您不能将外部网站/服务器上的PHP脚本包含在本地脚本中-除非您在php.ini
上启用allow_url_include
(如果您可以访问它)
You can't include a PHP script that is on an external website/server into your local script - unless you enable allow_url_include
on your php.ini
(if you have access to it)
相反,您可以让该网站/服务器呈现页面并在您的本地脚本中获取结果html输出.
Instead, you can let that website/server render the page and get the resulting html output on your local script.
在脚本中替换此行:
include('http://www.holidaysavers.ca/europe-canada.php?detour');
与此:
echo file_get_contents('http://www.holidaysavers.ca/europe-canada.php?detour');
这篇关于无法打开流:找不到合适的包装器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!