Posted: Sun Sep 10, 2006 7:27 am
sorry for Bumping, But i got the script working
Here it is:
Now i have to 'automaticaly' add .txt to the end of it 
Code: Select all
if(isset($_GET['page']))
{
$page = $_GET['page'];
$page2 = str_replace('..', '', $page);
print($page2);
$fp = fopen($page2, 'r'); // Open Page .txt for reading from beginning
$read = fread($fp, '1000'); // Read from the file pointer
print($read);
}
else{
$fp = fopen('index.txt', 'r'); // Open Page .txt for reading from beginning
$read = fread($fp, '1000'); // Read from the file pointer
print($read);
}