checking to see if a file exists

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

digitalbloke
New php-forum User
New php-forum User
Posts: 59
Joined: Tue Jul 01, 2003 7:02 am

checking to see if a file exists

Postby digitalbloke » Mon Sep 08, 2003 2:58 am

Hi i want to include an image but first check to see if it exists. if it does not i want to print a message saying so. How can i check see if it is there?

thanks!

User avatar
pootergeist
New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK
Contact:

Postby pootergeist » Mon Sep 08, 2003 3:24 am

if(file_exists('/home/hjsahj/hafh/file.ext'))

digitalbloke
New php-forum User
New php-forum User
Posts: 59
Joined: Tue Jul 01, 2003 7:02 am

Postby digitalbloke » Mon Sep 08, 2003 3:33 am

thank you! thank you!


Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests

cron