I'm working on developing a page in html / PHP where the purpose is to search for information about certain processes.
For each process covered by the search filter, the page displays a set of information.
My goal is to relate files from a specific directory that relate to filtered processes. All files are listed in the same directory, each file having its name beginning with the year and the process number (in this format: yyyy_p_resto-do-nome.zip
, where yyyy
is the year and p
is the process number).
Basically, I need an example code that will allow me to relate the downloadable files to the page based on that name start, keeping in mind that I work with variables in php for the year and the desired process number.
To try to make it easier to understand, let's say that from the universe of files I have in the directory, I want to relate all those starting with " 2018_10_
" to display on the page and download it.
I hope it has been clear enough. Thank you.