I have a .pdf
file in a directory that needs to be viewed/downloaded but the .pdf
file changes its filename every so often, so I was just wondering if there is anything I can do to make it a kind of wildcard so the button link changes to /files/*.pdf
The function you are looking for is glob().
<?php
print_r(glob("/files/*.pdf"));
?>
Have a look at: PHP glob() Function