...

View Full Version : Header Codes Help



knightcon
08-14-2007, 11:52 AM
hey, i'm writing a web application where if specific conditions are not met I want to be able to sent a HTTP error message to the browser. For example if the user currently logged in does not have access to a specific resource and they attempt to access it I want a http 403 Forbidden error code. I thought I could do it with header() but for some reason it is not working. Can any one see a problem with my code or help me in doing this?



<?php
header("Forbidden",false,403);
?>

Pennimus
08-14-2007, 12:21 PM
<?php
header("HTTP/1.0 403 Forbidden");
?>

http://uk.php.net/header



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum