[PHP] Test if picture exists then load.

2002-01-10 Thread Dean Householder
I'm not sure what function I need to use, but I want to test if a picture exists in a directory and if it does to display it but if not display another graphic that says 'No Graphic Available'. Would that be fopen()? or something else? I'm still new to PHP so any feedback would be very

Re: [PHP] Test if picture exists then load.

2002-01-10 Thread Jason Wong
On Thursday 10 January 2002 18:19, Dean Householder wrote: I'm not sure what function I need to use, but I want to test if a picture exists in a directory and if it does to display it but if not display another graphic that says 'No Graphic Available'. Would that be fopen()? or something

Re: [PHP] Test if picture exists then load.

2002-01-10 Thread Jimmy
Would that be fopen()? or something else? I'm still new to PHP so any feedback would be very appreciated. Use file_exists() to check whether a file exists. file_exists() function is quite slow. in your case, better do fopen() to check if the file exist, because you gonna do fopen() anyway