When executing a PHP page through browser , we will just get the output but not the errors in code.
how can i view the errors occurred by the code in the backend??
I am using the following in the code for error reporting..
error_reporting(E_ALL | E_ALL);
If you have set your PHP code to display errors and they are still not visible, you may need to make a change in your php. ini file. On Linux distributions, the file is usually located in /etc/php. ini folder.
Enable Error Logging in php. To log errors in PHP, open the php. ini file and uncomment/add the following lines of code. If you want to enable PHP error logging in individual files, add this code at the top of the PHP file. ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
To show invalid input in PHP, set the name of the input textbox which is in HTML. All the fields are first checked for empty fields and then it is validated for correctness. If all fields are correct then it shows the success message.
ini_set('display_errors', 1); error_reporting(E_ALL ^ E_NOTICE);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With