arkum Posted December 22, 2006 Share Posted December 22, 2006 Hi there,Contenderm for stupid question of the year...In the same way that you can if a file is writable using: is_writable( myFile );How can I test to see if a file exists?? Quote Link to comment Share on other sites More sharing options...
taith Posted December 22, 2006 Share Posted December 22, 2006 [code]<?$filename = '/path/to/foo.txt';if(file_exists($filename)) echo "The file $filename exists";else echo "The file $filename does not exist";?>[/code] Quote Link to comment Share on other sites More sharing options...
craygo Posted December 22, 2006 Share Posted December 22, 2006 file_exists()RayEDIT: late again!! :) Quote Link to comment Share on other sites More sharing options...
arkum Posted December 22, 2006 Author Share Posted December 22, 2006 Well hot diggedy damn that was the fastest reply I ever did get. Thanks. And another while I'm typing this. Thanks to you too. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.