Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Xampp & Php

Options
  • 09-06-2008 4:34pm
    #1
    Registered Users Posts: 1,002 ✭✭✭


    I've just installed XAMPP. My localhost seems to be working fine as I can see my html pages via Apache.
    However, I have PHP code that changes an image depending on the page displayed. This code works fine on the external hosting company site but not on my local machine. It doesn't give me any error at all - just doesn't seem to process the code. Where do I start looking??? :o
    [PHP]
    if ($PHP_SELF == '/index.php')
    {
    echo ('<img src="/image1.gif" width="20" height="20">');
    }
    elseif ($PHP_SELF == '/aboutus.php')
    {
    echo ('<img src="/image2.gif" width="20" height="20">');
    }......
    [/PHP]


Comments

  • Technology & Internet Moderators Posts: 28,793 Mod ✭✭✭✭oscarBravo


    First, display the source of the page (ctrl-u on Firefox), see if there's anything at all there. Check the apache logs, /var/log/apache2/error.log on my server. Finally, you can stick strategic "print" statements into your code to help with debugging.


Advertisement