PHP

How to Show Errors in PHP


Below script is to show errors in PHP, the error_reporting function will show all the error.
You have to initialize at the start of PHP tag.
 ini_set('display_errors',0);
ini_set('log_errors',1);
error_reporting(E_ALL);
$FileName = "vivek.csv";
$File = fopen($FileName, 'w+');
    if($File)
{
echo "ok";
}
else {
echo "no";
}
?>