Jump to content
MakeWebGames

How do you disable Errors from appearing on screen?


Recommended Posts

Posted

Done some more reading and placing "php_value error_reporting 0" in htaccess would work too (better, depending on how you look at it)

and no thanks :P

Posted

Shows what you know.

I have no mysql_errors() and though I havent been able to cause any to show since i updated a few things, they were.

Mysql errors tend to show when .....kids...Like you try sql injections.

I want it to send a blank page or no error at all.

Don't want you guys knowing my tables after i Re-name them. Going to secure and re-name for extra security.

Posted
Shows what you know.

I have no mysql_errors() and though I havent been able to cause any to show since i updated a few things, they were.

Mysql errors tend to show when .....kids...Like you try sql injections.

I want it to send a blank page or no error at all.

Don't want you guys knowing my tables after i Re-name them. Going to secure and re-name for extra security.

lmao - You wont see mysql_error() because it is in the database class file that is how you use $db->query('some query'); -.-

Go to folder class -> db_class_mysql.php or something like that and you will see that in there. -.-

Posted

You could use an empty "or die()" at the end of your mysql statements if you don't want to return an error.

For example: mysql_query($sql) or die();

Or if you'd like, you can display a message in the die() function when mysql calls don't go right.

For example: mysql_query($sql) or die("Error, Your IP has been logged. This event will be reviewed by an administrator.");

Posted

In php put the fallowing code on the page you want no errors to display. You can change the value to 1 if you want them to display.

 

ini_set('display_errors', 0); 

 

You can also create a php page and put that code in it then include that page to your pages or even put it in your header.php if its for your game.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...