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

Link to comment
https://forums.phpfreaks.com/topic/273145-checking-if-a-file-exists-on-server/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.