Okay so let’s say I have a folder and in a folder I have a ton of text files.
TextLog11564.txt
TextLog21564.txt
TextLog3456.txt
and so on, how would I open all of them, get the contents, and display them on the page? I know how to open a text file and read stuff from it but is there a way to open up all text files that start with “TextLog”? Instead of having to call them each one by one in the code.
You can use
glob()for this: