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?? Link to comment https://forums.phpfreaks.com/topic/31589-solved-does-file-exist/ 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] Link to comment https://forums.phpfreaks.com/topic/31589-solved-does-file-exist/#findComment-146415 Share on other sites More sharing options...
craygo Posted December 22, 2006 Share Posted December 22, 2006 file_exists()RayEDIT: late again!! :) Link to comment https://forums.phpfreaks.com/topic/31589-solved-does-file-exist/#findComment-146416 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. Link to comment https://forums.phpfreaks.com/topic/31589-solved-does-file-exist/#findComment-146417 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.