ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How to hide the php error on webbrowser?

user-image
تم إضافة السؤال من قبل Mohammad Irfan , Certified Magento Developer , Xcite.com
تاريخ النشر: 2013/10/25
Muhammad Majid Saleem
من قبل Muhammad Majid Saleem , Senior PHP Developer / Project Manager , SwaamTech

You can hide them using error_reporting(0); at the top of the page.

Fadi Alkhateeb
من قبل Fadi Alkhateeb , Senior Front End Developer , NexTwo

You have two options:

  1. If you have access and permisson to edit php.ini, search for (display_errors) inside it and put value (off): display_errors = Off
  2. Using (error_reporting(0);) at the top of the page.

[?php error_reporting(0); ?]

 

Atif Majid
من قبل Atif Majid , Senior PHP Programer/Team Lead , RedApple Apartments AB

If it is production server and you have access to php.ini file, then it is best to turn off display_errors.

Else you can do it from your script as

ini_set("display_errors", "Off");

 

Or you can use .htaccess to override the values for your web directory (if you are on a shared hosting server)

Arfa Maham
من قبل Arfa Maham

simply write error_reporting(0); at start of page inside php tag

islam khalil
من قبل islam khalil , Technical Manager , iCloudit

start you script with

error_reporting(0);

Noor Khan
من قبل Noor Khan , Technical Team Lead , Ammrys Studios

which type of error you need to hide, cuz there are to many type of errors 

Malik Faizan Babar
من قبل Malik Faizan Babar , Head of Solutions Delivery , Optimizia

include this function on top of the page or include in header file  <?php error_reporting(0); ?>

المزيد من الأسئلة المماثلة