Jump to content

direland

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

direland's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=378906:date=May 31 2006, 09:07 PM:name=shortj75)--][div class=\'quotetop\']QUOTE(shortj75 @ May 31 2006, 09:07 PM) [snapback]378906[/snapback][/div][div class=\'quotemain\'][!--quotec--] here is the if statement i use and it works great [code] $filename="../pic.gif"; if(file_exists($filename)) {          echo "<img src=../$filename target=_blank>";    } else {   echo "<img src=../if no pic.gif height=100 width=100>"; } [/code] [/quote] Thanks! This works perfectly!!
  2. Is there an "if" statement I can use to check if an image exists in a certain directory, and if it does display it, but if it doesn't exist then display another image in a different directory? I've written simple "if" statements for text display, but nothing like this. Is this possible? It might help to tell the scenario. I am putting together templates for teacher web sites. If they wish, they can upload their own logo into their upload directory to display at the top of the page, but if they choose not to upload their own logo I want the default (district) logo to appear there. The default logo is located in another directory on the same server. Thanks in advance!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.