Hy, I would need a script where I would specify numbers of files(and path to this folder) in folder and then it woul pick a random number - files in folder would have names in number like 1.txt, 2.txt,..etc - and then it would echo file with that number. Then I would include that file in my page to display random content. I am already having script where I dont have to specify number of files and files dont have to be in numbers, but it's eating too much resources, because I have few included in page and a lot of files to choose from.
I know its simple script, but I have no knowledge of php.
Random file
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Random file
It would be faster and more efficient to use a mysql database.
Re: Random file
Yes, but I have this script to use for multi use, as well as displaying pictures, and I think for somebody who knows php would take few minutes.