I want to link to a page selected randomly from all the html files in a directory.
I have tried http://www.url.com/directory/?random but only get a 404 error.
Are there permissions that I need to change? What is the simplest way of doing this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no magic in programming.
Won’t give you magically a random page in that directory.
You need to write a script to do that. Example random.php.
So you would do something like:
In that random.php script, you need to write code for:
Code for random.php should be relatively simple.