think-digitally Posted June 19, 2008 Author Share Posted June 19, 2008 hmm, I still get it to work, it shows internal server error, and sometimes loads a page, but with random ?and blocks all over it. Any ideas? Heres what I put in <?php $top=6; //How many images you have... or anything I guess. $dir="2/"; $od=opendir($dir); $rand=rand(1,$top); $ndone=true; while ($ndone) { while ($file=readdir($od)) { $nr=rand(1,$top); if ($nr==$rand) { readfile($dir."".$file); $ndone=false; } } } closedir($od); ?> Quote Link to comment Share on other sites More sharing options...
Stephen Posted June 19, 2008 Share Posted June 19, 2008 You have to fix the dir. Mine was set to like "/home2/site/www/images/" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.