Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: A litlle help in here ...

  1. #11
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    That should work, yes. I'd still recommend switching to Apache, though, simply because it's a better webserver (and free, incidentally).
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  2. #12
    Join Date
    Apr 2006
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I will do that ... Just hope my webhosting company can do that ...
    Thank you all again for the help.

  3. #13
    Join Date
    Apr 2006
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If I only get the Hah wrong reply means I probably don't have php enabled on the server ?



    Quote Originally Posted by Twey
    Nonsense.
    PHP Code:
    <?php
    if($_POST['user'] == "correctuser" && $_POST['pass'] == "correctpass") {
      
    header("Content-Type: application/x-pdf");
      
    readfile("realpdffile.pdf");
    } else {
    ?>

    <html>
      <head>
        <title>
          Unauthorized
        </title>
      </head>
      <body>
        <p>
          HAH, WRONG!
        </p>
      </body>
    </html>

    <?php ?>
    However, you'd still need to fiddle with the config to parse the .pdf file as PHP, so you might as well stick with .htaccess.

  4. #14
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It could do, yes. It could also mean that the user and password aren't correct. Try a test like:
    Code:
    <?php echo("You have PHP enabled on your server."); if(false) { ?>
    You don't have PHP enabled on your server.
    <?php } ?>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #15
    Join Date
    Apr 2006
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You don't have PHP enabled on your server. - Beautifull - By the way ... they refused to change from windows to lunix ... they said it's a different platform and they can't do it. Not PHP is not enabled ! Note to self ... never buy from these guys again.

  6. #16
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    What's the file extension on that file? It could just be not being parsed as PHP.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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