In the parent page, call a function that will open a new window. This new window will call a PHP script that will open a certani file specified in the query_string...
Parent page :
...
<SCRIPT>
function oWin(url) {
window.open(url, "FileRead", "....................");
}
</SCRIPT>
...
<A HREF="javascript:oWin('./showcontents.phh3?file=myfile.txt');">Click here to see myfile.txt</A>
...
showcontents.php3 :
<?
$file_name = @_REQUEST["filename"];
if(file_exists($filename)){
$fh =fopen($filename, "r");
$old_news = fread($fh, filesize($filename));
echo $old_news;
fclose($fh);
} else {
echo "Invalid file.";
}
?>