Jump to content

Checking If A File Exists On Server


sintax63

Recommended Posts

I've done some searching and digging on here but have come up empty. Maybe it isn't possible or I'm just not using the correct terminology. In any case, here is what I would like to accomplish...

 

I want to query a database for a name (easy peasy) and then see if a file (PDF in this case) named the same name exists in a specific directory. If it does, display a link to it. If not, state the fact no file is found.

 

So if I am querying the database for "1234-5678", it checks "/files/items" for "1234-5678.pdf".

 

Is something like this even possible?

 

Thanks!

 

-------------------------------------------------------------------------------------------------

I'm running a fresh and up to date install of both PHP and MySQL

Edited by sintax63
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.