目前,我正在使用SIMPLE_HTML_DOM来报废一些信息。我做了一些网站,但我有一个问题。当我使用:“new/news.php”时,请看一下这个站点:
$url = 'http://www.prawo.uwb.edu.pl/prawo_new/news.php'; file_get_html($url);
我得到了
未能打开流:在第75行的./simple_html_dom.php中没有这样的文件或目录
,但我也检查了这个网站的www.import.io页面,并工作良好。我读过关于urlencode()的文章,但没有成功。
谢谢你提前
发布于 2015-09-25 12:46:28
我试着用这个解决方案和函数描述的卷曲方式
get_web_page为我工作:)
发布于 2015-09-16 17:45:58
在您的例子中,$url是一个指向某个页面的链接。
对于此函数,您需要使用系统路径。
要从网页中获取内容,请使用上下文参数的url。
示例:
$opts = array(
'http' => array(
'method' => 'GET',
'header' => 'Accept-language: en\r\n'
)
);
$context = stream_context_create($opts);
$file = file_get_contents('http://your.site/', false, $context);https://stackoverflow.com/questions/32615220
复制相似问题