Wednesday, 15 April 2015

php check if file exist -


Can anyone tell me how the file is already present in the database or it is not told before uploading it ?

I want to upload a file to the database, but before saving it, I have to check that whther file already exists first. If so, do not execute insert.

I have used it on uplaoding a file.

Thank you very much.

I'm not sure that this is what you are asking, but do you have functions in PHP, Use File_exists (Absolute-Path-to-File)?

  $ exists = file_exists ('myfile.doc'); If (! $ Exists) {// your processing}  

If you are checking the database, just to call your file which Also ask columns Example:

  Select from my table WHERE my-column = 'my-uploaded-file-name';  

No comments:

Post a Comment