php - error_reporting(0) not affecting error display on page: -


error_reporting(0) not affecting error display on page:

i checking website on localhost server (xampp) , want hide errors visitors of website.

however, have tried add custom message visitors won't able actual error , instead logged error error.log file on server, if don't want either of 2 ?

to set error_reporting(0) / ini_set('display_errors',0); on script won't working me , anyhow reporting error error log

code :

ini_set('display_errors',0); error_reporting(0); $query = "select * user1 uname = '34'";   //user1 not exist,     wrote error  mysql_query($query)  or  die(errorhandler($query,mysql_error()));  function errorhandler($query,$error){    $pesan = htmlspecialchars("failed query: ".    $query ."<br>".$error );    error_log($pesan,3,"error.log");   // log error error.log file     return "page not exists, try other.";   // user see message, no     matter error  } 

please don't suggest return "" instead "page not exists, try other.";


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -