Many times we got requirement of check file from specific directory. Following code will work in all the system like (Mac, Linux and Windows).
Using following php code you can check file is present or not in specific directory.
<?php
$filename = '/var/www/html/test/test.txt';
if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
?>
Functions of Mozilla Firefox: Mozilla Firefox is an open source web browser, helping million of users to surf through net with ease. It has number of added features like add-ons, which are developed by third party, tabbed browsing, download manager and so on.
Pingback: Tweets that mention How to to check file exists or not using php | Wordpressapi.com - Developer Code book -- Topsy.com
Good post, thanks
Functions of Mozilla Firefox: Mozilla Firefox is an open source web browser, helping million of users to surf through net with ease. It has number of added features like add-ons, which are developed by third party, tabbed browsing, download manager and so on.
Intriguing post. I have been searching for some good resources for solar panels and discovered your blog. Planning to bookmark this one!