Hello
I use this script to random include file from a directory. I must declare all files that i want to choose from.
Is it possible to change this that it includes files from a directory without that i must declare each single file?
Thank you, please excuse my bad englishPHP Code:
<?php
srand();
$files = array("/1/file1.txt", "/1/file2.txt", "/1/file3.txt", "/1/file4.txt","/1/file5.txt","/1/file6.txt");
$rand = array_rand($files);
include ($files[$rand]);
?>
Bookmarks