How to check file is exist or not using php

We can check the file is exist or not in the folder using  file_exists function

Here is a simple code to check the presence of the file

$add="images/119.jpg";
if(file_exists($add))
{
echo "Yes file is there ";
}
else
{
echo "Sorry no file at $add ";
}


To seek challenging roles and to achieve excellence in the field of Open Source Web Technology with a profound spirit of commitment and dedication.

Share This Post

Related Articles

© 2017 Sumit Bansal. All rights reserved. Site Admin · Entries RSS · Comments RSS
Powered by WordPress · Designed by Theme Junkie