Hello Guys, actually im searching for a method to get a worth from all Config Files in a specified Directory.Why? Im saving all Reports in a /Reports/ Directory, and when a staff member would execute /reports, there should be a UI showing a button for each Report.The Button part is easy, but i want to make the Button text {Reported}, {Reason}. Regards, Tobias aka BLOCKSTORM_
You can list files in a directory using https://php.net/dir However, for better performance, it is better to store a file that indexes all active reports yourself.
Im just guessing what he wanted to do is: - Allow his staff to see all reports by execute /reports. - All reports are saved in '/Reports/' directory. I dont get it when he want button {Reported}, {Reason}. Anyway, you can save all reports in single file.
But all in one file? how to realize this? Saving every report in a file like 1: {Reported}:{reporter}:{reason}:{status}:{staff} And the count get higher for every report. Or how?
Or you could just use an SQLite3 database. That's optimal for your purpose. If you want to stick to YAML files, try making an index.yml that stores an array of all report IDs.