Re: [PHP] Is there a way to test for a file?
> I'd like PHP to check to see if the image/picture.jpg exists before > returning the picture. Is this possible? Yup - It's in the manual. http://www.php.net/manual/en/function.file-exists.php Cheers Andy - Original Message - From: "Doug Coning" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 08, 2002 3:59 PM Subject: [PHP] Is there a way to test for a file? > Hi everyone, > > I'm a PHP newbie and wanted to know if there is a way to test for a file. > The reason I'd like to do this is because I'm writing a query to return > items from a catalog. However, if the client hasn't uploaded a picture or > if the picture is misteriously missing from the image folder, instead of > returning the product with the infamous missing jpeg picture, I would rather > the product be skipped altogether. > > I'd like PHP to check to see if the image/picture.jpg exists before > returning the picture. Is this possible? > > Thanks! > > Doug Coning > American Web Studio > www.americanwebstudio.com > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a way to test for a file?
http://www.php.net/manual/en/ref.filesystem.php you can see that there is a function called file_exists, is_file, is_readable etc etc.. hope this helps. thats the PHP Filesystem function specific manual, On Tuesday 08 October 2002 09:59, Doug Coning wrote: > Hi everyone, > > I'm a PHP newbie and wanted to know if there is a way to test for a file. > The reason I'd like to do this is because I'm writing a query to return > items from a catalog. However, if the client hasn't uploaded a picture or > if the picture is misteriously missing from the image folder, instead of > returning the product with the infamous missing jpeg picture, I would > rather the product be skipped altogether. > > I'd like PHP to check to see if the image/picture.jpg exists before > returning the picture. Is this possible? > > Thanks! > > Doug Coning > American Web Studio > www.americanwebstudio.com -- Vidyut Luther Linuxpowered, Inc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is there a way to test for a file?
Hi everyone, I'm a PHP newbie and wanted to know if there is a way to test for a file. The reason I'd like to do this is because I'm writing a query to return items from a catalog. However, if the client hasn't uploaded a picture or if the picture is misteriously missing from the image folder, instead of returning the product with the infamous missing jpeg picture, I would rather the product be skipped altogether. I'd like PHP to check to see if the image/picture.jpg exists before returning the picture. Is this possible? Thanks! Doug Coning American Web Studio www.americanwebstudio.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php