Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Xampp & Php

  • 09-06-2008 03:34PM
    #1
    Registered Users, Registered Users 2 Posts: 1,000 ✭✭✭


    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,863 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