Php > Site Navigation
Dynamic Error Pages
Dynamic Error Pages
Bad Request
Error 400
The URL that you requested, was a bad request.
If this problem persists please report it by sending an e-mail to
'."$email".'
, mentioning the error message received and the page you were trying to reach. We are sorry for any inconvenience caused and we will do all we can to fix the error as soon as possible.
'; break; //Error 401 - Authorization Required case 401: $errorname = 'Error 401 - Authorization Required'; $errordesc = '
Authorization Required
Error 401
The URL that you requested, requires preauthorization to access.
If this problem persists please report it by sending an e-mail to
'."$email".'
, mentioning the error message received and the page you were trying to reach. We are sorry for any inconvenience caused and we will do all we can to fix the error as soon as possible.
'; break; //Error 403 - Access Forbidden case 403: $errorname = 'Error 403 - Access Forbidden'; $errordesc = '
Access Forbidden
Error 403
Access to the URL that you requested, is forbidden.
If this problem persists please report it by sending an e-mail to
'."$email".'
, mentioning the error message received and the page you were trying to reach. We are sorry for any inconvenience caused and we will do all we can to fix the error as soon as possible.
'; break; //Error 404 - Page Not Found case 404: $errorname = 'Error 404 - Page Not Found'; $errordesc = '
File Not Found
Error 404
We're sorry but the page you are looking for cannot be found.
If this problem persists please report it by sending an e-mail to
'."$email".'
, mentioning the error message received and the page you were trying to reach. We are sorry for any inconvenience caused and we will do all we can to fix the error as soon as possible.
'; break; //Error 500 - Server Configuration Error case 500: $errorname = 'Error 500 - Server Configuration Error'; $errordesc = '
Server Configuration Error
Error 500
The URL that you requested, resulted in a server configuration error. It is possible that the condition causing the problem will be gone by the time you finish reading this.
If this problem persists please report it by sending an e-mail to
'."$email".'
, mentioning the error message received and the page you were trying to reach. We are sorry for any inconvenience caused and we will do all we can to fix the error as soon as possible.
'; break; //Unknown error default: $errorname = 'Unknown Error'; $errordesc = '
Unknown Error
The URL that you requested, resulted in an unknown error. It is possible that the condition causing the problem will be gone by the time you finish reading this.
If this problem persists please report it by sending an e-mail to
'."$email".'
, mentioning the error message received and the page you were trying to reach. We are sorry for any inconvenience caused and we will do all we can to fix the error as soon as possible.
'; } //Display selected error message echo($errordesc); //E-mail error to your e-mail address (If you do not wish to receive emails delete the following paragraph) $datetime = date("l dS of F Y H:i:s"); $message = "
The following error has been received on "."$datetime\n
\n
\n"; $message .= "
$errorname
\n"; $message .= "
Requested URL:
" . $requested_url . "\n
Referring URL:
" . $referring_url; $message .= "\n
IP Address:
".$_SERVER['REMOTE_ADDR']; $to = "$email"; $subject = "Web Site Error"; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; mail($to,$subject,$message,$headers); //End of E-mail sender ?>
Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage