Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do I Hide Website Errors To User from PHP

Hello Guys I Want To Upload My Website To The internet But I Have Error In The Website Can I hide These Errors? And Thank You!

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

you can control visibility of errors with error_reporting(). To skip warning messages, you could use :

error_reporting(E_ERROR | E_PARSE);

or

ini_set(‘display_errors’,’Off’);

If you use any frameworks like codeigniter or laravel or yii ….
these frameworks has their own mechanism to switch between development or production state. for example laravel use .env value to determine which state are sett.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading