Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

checking to see if a file exists

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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!
digitalbloke
New php-forum User
New php-forum User
 
Posts: 59
Joined: Tue Jul 01, 2003 7:02 am

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

if(file_exists('/home/hjsahj/hafh/file.ext'))
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

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

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


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 5 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.