GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   error_reporting(E_ALL ^ E_NOTICE); (PHP) (https://gfy.com/showthread.php?t=442108)

qw12er 03-09-2005 03:41 PM

error_reporting(E_ALL ^ E_NOTICE); (PHP)
 
I just did what I saw oin php.net to report display PHP's errors.

I also tried 98345394 other variants but no luck.

anybody knows how to displays error in PHP ? ( I don't have acces to files, I'm on Virtual Hosting for now)

lb_vee 03-09-2005 03:44 PM

Can you maybe post some of your code??

qw12er 03-09-2005 03:46 PM

Well ...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Insert tcg</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="C6C6C6" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<?

error_reporting(E_ALL);

then the rest of my code ...

?>

qw12er 03-09-2005 03:50 PM

All I get is a blank page ... (When I have an error in my code)

calmlikeabomb 03-09-2005 03:59 PM

Hi,

What you need is config.inc just save this code as config.inc and include at the top of your php pages.

Code:

<?php

// This script sets the error reporting and logging for the site.

//error_reporting (0); // Production level
error_reporting (E_ALL); // Development level

// Use my own error handling function.
function my_error_handler ($e_number, $e_message, $e_file, $e_line) {

        $message = 'An error occurred in script ' . $e_file . ' on line ' . $e_line . ": $e_message";
        //error_log ($message, 1, '[email protected]'); // Production (send email)
        echo '<font color="red">', $message, '</font>'; // Development (print the error in red)
}
set_error_handler('my_error_handler');
?>


qw12er 03-09-2005 04:15 PM

Thanks ! Working like a charm!!!

calmlikeabomb 03-09-2005 04:16 PM

You're welcome bro.


All times are GMT -7. The time now is 03:50 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123