Re: file_Exists() and case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Let me attack this in a different way.  This started because my camera names
files whatever.JPG and my thumbnail generator generates thumbnail files
whatever.jpg.  Given my workstation (upon which I edit code and run a web
browser) is W2K and my web server is APACHE2 on UBUNTU, I sometimes have to
run out back and scream to maintain my sanity.  I do not want whoever (my
wife, my kids, maybe even my grandkids) to have to manually change either
picture file extensions or generated thumbnail extensions on a mass of
pictures they're trying to add to our web site ... over the Internet in some
cases.

I was attempting to avoid the overhead of generating thumbnails on the fly
as I construct a page of thumbnails related to a specific event or subject
because I don't know how many thumbnails may be rendered.  The subject on
which I encountered this problem (for the second time this week) has
something in the order of 250 pictures (in several different directories).

What I'd really like to be able to do is to detect, programmatically, FOR
SURE and FOR CERTAIN, that a specific file exists BEFORE I generate the
anchor tag that contains the thumbnail ... given that every image file has a
thumbnail file in a different directory than the image file.  I need to try
the file identifier from which the thumbnail file identifier was derived
and, that failing, try changing the extension.  If I can't find it I don't
want to put up the thumbnail.

How can I do that, please?  Do what?  Detect, programmatically, FOR SURE and
FOR CERTAIN, that a specific file exists.

Thanks,



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux