Jump to content


Phantom path

  • Please log in to reply
1 reply to this topic

#1 adgold

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 06 May 2006 - 06:04 AM

I'm using PHP to display information from a MySQL database about various issues of a (paper) magazine. GIF thumbnails and PDF proofs of each page are stored like so:
/0605/gif/0605_001.gif . . . 0605/gif/0605_999.gif
/0605/pdf/0605_001.pdf . . . 0605/pdf/0605_999.pdf

This works fine for all the issues I have online -- I get a GIF thumbnail and a link to the PDF in my PHP-generated report.

However, I have older info in the database for which no GIFs, PDFs, or directory structure exists. In those cases, my PHP-generated report will substitute its best guess for what I'm looking for. For example, a call to 0405_001.gif gives me an image and link for 0605_001 . . . when I would have expected (and preferred) a missing image and a broken link. This happens in both IE and Firefox.

I don't even know if this is a PHP problem, but the smartest people in the world read these forums, so anyone know what's going on here?/

#2 alpine

  • Members
  • PipPipPip
  • Advanced Member
  • 756 posts
  • LocationNorway

Posted 06 May 2006 - 06:57 AM

do a check to see if it exists, like for example this:
print "<img src=\"path/icon.gif\" alt=\"icon\" />";
print "This file does not exist..";

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users