0
<?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);

Question:

It shows: Warning: file_get_contents(http://api.biblia.com/v1...

Is there a way that can hide this message, instead show a message such as "can not show the result"?

user2318128
  • 109
  • 1
  • 3

3 Answers3

0

use @ to suppress warning..but it is not a preferable method to suppress warning/notices/errors, instead you should try to debug your code to check what is going wrong behind the scene.

error_reporting() is another way of handling these errors.

swapnesh
  • 26,318
  • 22
  • 94
  • 126
0

Use @ symbol like this:

$html_url = 'http://api.biblia.com/v1/bible/content/LEB.html?passage=John333&style=fullyFormatted&key=fd37d8';
$str_html  = @file_get_contents($html_url);
0
error_reporting(0);

try this link

VeNoMiS
  • 330
  • 5
  • 15