Error Headers

This sections will contains code regarding different PHP & MySQL features and contains help about php/mysql issues.

Error Headers

Postby MT Shahzad on March 13th, 2008, 9:33 am

You can send the http errors to the browsers in php using the function header() as shown below:

403 Error
Code: Select all
header("HTTP/1.0 403 Forbidden");


404 Error
Code: Select all
header("http/1.0 404 Not Found");
MT Shahzad
Web/Software Developer
http://mts.sw3solutions.com
User avatar
MT Shahzad
Site Admin
 
Posts: 300
Joined: February 29th, 2008, 8:11 am
Location: Muridke, Pakistan

Re: Error Headers

Postby php developer on August 11th, 2008, 5:31 am

If you are experiencing issues with the above mentioned statements, then you can try the alternate code. This is to be used when the Server is running PHP as CGI.

Code: Select all
  header('Status: 404 Not Found');
php developer
 
Posts: 25
Joined: July 25th, 2008, 4:56 am


Return to PHP / MySQL / XML

Who is online

Users browsing this forum: No registered users and 0 guests