ျမန္မာေတြကြန္ပ်ဴတာကုိ ကေလးကစားစရာလုပ္ၾကမယ္။
This is not a dream!!!

Saturday, June 1, 2013

how to disable 4rror reporting in PHP for Security

PHP developer ရဲ့ လွိဳ႕၀ွက္ခ်က္တစ္ခုျဖစ္တဲ့ error reporting ကုိ ေဖ်ာက္တဲ့ကုဒ္ပါ။
သင့္ရဲ့ ၀က္ဆုိဒ္မွာ ဘယ္ေလာက္ပဲ error တက္ေနပါေစ။ မေပၚေအာင္လုပ္လုိ႔ပါတယ္။
 ေအာက္ကကုဒ္ေလးကုိ တစ္ခ်က္ၾကည့္ပါ။ error_reporting(0); ဆုိတာေလးကုိေတြ႕မွာပါ။
error_reporting(0); မွာ 0 ထည့္ထားတဲ့အတြက္ေၾကာင့္ error မတတ္တာပါ။

<?=
session_start();
error_reporting(0);
require 'database/connect.php'; 
require 'functions/general.php'; 
require 'functions/users.php'; 
if (logged_in() === true) {
$session_user_id = $_SESSION['user_id'];}

?>



if(yourskill != 100%) {
print 'Don't tase mm sites';
}else
{print 'return your home';}

http://mmitbloggers.blogspot.com/2012/12/90-percent-php-security.html

Comment

IP