0
Follow an example to list the files (of a certain type) in a directory.
chdir( 'path' );
$files = glob("{*.pdf,}", GLOB_BRACE);
foreach($files as $file) echo $file;
Remembering that as commented, this is not the best way for a solution like yours. ;)
You can do it by listing the files in the directory, yes! The point is that this is by no means the best way to do this. A good way would be to rename all Pdfs by putting in them simple names, without spaces, accents, special characters and preface, random names to avoid collision, Example: 31af03ba111d8c38a3be9936c9c427ba.pdf and there you would use a database to register the entire collection, linking the name of the file with the registered title in the bank. That’s a good way. The point is, you’re willing to go to all this trouble to have a better system?
– Clayderson Ferreira
Possible duplicate of List files from a folder / directory in PHP
– user41210
And how could I do that? :D don’t know much kk
– Leonardo Fernandes