【发布时间】:2013-05-14 16:41:35
【问题描述】:
<?php
$html_url = 'http://api.biblia.com/v1/bible/content/LEB.html?passage=John333&style=fullyFormatted&key=fd37d8';
$str_html = file_get_contents($html_url);
问题:
它显示:警告:file_get_contents(http://api.biblia.com/v1...
有没有办法可以隐藏这条消息,而不是显示一条消息,例如“无法显示结果”?
【问题讨论】:
-
大多数情况下 file_get_contents( 在远程服务器上被禁用。您应该使用 PHP Curl 从 url 获取 html 内容
标签: php