Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2007
    Location
    Griffith. Australia
    Posts
    138
    Thanks
    4
    Thanked 4 Times in 4 Posts

    Header Codes Help

    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 Code:
    <?php
    header
    ("Forbidden",false,403);
    ?>

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    UK
    Posts
    1,051
    Thanks
    6
    Thanked 13 Times in 13 Posts
    PHP Code:
    <?php
    header
    ("HTTP/1.0 403 Forbidden");
    ?>
    http://uk.php.net/header


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •