file_exists(): Checking file

$add="images/119.jpg";
if(file_exists($add)){
echo "Yes file is there ";
}else{
	echo "Sorry no file at $add ";
}
In our script before executing a program we need to check if file exists or not. This file check method by using file_exists function check the presence of file from relative path we specify and then returns TRUE of False based on the presence of the file.

File Deleting all ( or by selection ) files of a directory Directory Functions
PHP
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    Anand

    17-08-2010

    It helps me 2 much. Thanks

    Post your comments , suggestion , error , requirements etc here





    PHP video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer