0

I need a php code that will open and show a random text file(something.txt) in the webpage.I found so many scripts that open a random line in one textfile but i need a code in php that will open a random .txt format file in a specific folder to see on a web page.
Please help..

1
Contributor
2
Replies
4
Views
7 Years
Discussion Span
Last Post by kirtan_thakkar
0

I use this code for reading a text file..
But it shoud have to be a random file..
Help me to create that...

$myFile = "testFile.txt";
$fh = fopen($myFile, 'r');
0

I use this code for reading a text file..
But it shoud have to be a random file..
Help me to create that...

$myFile = "testFile.txt";
$fh = fopen($myFile, 'r');

I have done it myself....

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.