wordpress - the best way to hide / customize this php error -
i have code works fine
$done_getting = file_get_contents($url); if($done_getting == !null) { return $done_getting; } else { return $custom_error_msg; }
if i'm online fetches $url , displays on page, in event of slow internet connection or offline
warning: file_get_contents(url ): failed open stream: http request failed! in xxxxxx
this correct error msg php , how customise msg instead of getting 1 tells user root files are.
is possible customise it.
i using in wordpress(debug mode). code above works too, when there error returns $custom_error_msg after showing default php error.
Comments
Post a Comment