Check File Exists Script

Check File Exists Script is use to when you upload the file to server this script chack the file exists already.

Demo :



Upload File :   

Following file have on server :

Dummy.txt
Tutorial.txt

Example :

Just click Browse... button then select image or any one file and click Upload button then if the file exists "This file already exists this server you upload another file" message will display here otherwise "This file does not exists on this server...Thanks for Uploading..." message will display here.

Code :

Following code is use to check a file exists on this server if you need to copy and use to your website.


<?php
   $image_upload = "Dummy.txt";
   echo file_exists('upload_files/check-file-exists-demo/'.$image_upload) ? "This file already exists this server you upload another file" : "This file does not exists on this server...Thanks for Uploading...";
?>

In the above $image_upload variable is use to assign the file name and file_exists() function is use to check in the file on this server. This function have in one argument that name is string filename.

Free Download Script :

If you need Check File Exists Script click and download from following link.

Download




Content