Jump to content

file_exists with only part file name??


Scooby08

Recommended Posts

I'm just trying to find out if php has the ability to check if any file exists, with only part of the filename given..

 

I have this path:

 

if (file_exists($dir.'/'.$c_file.'/templ_*')) {

 

I added a little star.. That star represents whatever the rest of that file is named for this example.. It could be anything.. So can php match any files that start with "templ_", and say that it does or does not exist??

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/210981-file_exists-with-only-part-file-name/
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.