How to check file is exists or not in PHP?

How to check file is exists or not in PHP?

In this post we will give you information about How to check file is exists or not in PHP?. Hear we will give you detail about How to check file is exists or not in PHP?And how to use it also give you demo for it if it is necessary.

If you need to check file is exixt or not on folder. Normally we require to check image is exist or not, video is exists or not etc. In this example i use file_exists() for determine file is available or not in given path. So if you also need check then follow bellow example:

Example:

if(file_exists('./upload/flower.jpg')){

print_r('Image is exist.');

}else{

print_r('Image is not exist.');

}

Hope this code and post will helped you for implement How to check file is exists or not in PHP?. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

  +  18  =  23

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US