here is an error.
PHP Code:
echo ('<a href="'.$tmp_dir.$file.'">'.$file."</a><br>");
you browser knows nothing about the '/tmp' directory on your server.
u've to let some other script to serve file download.
so u need to do something like this
PHP Code:
echo ('<a href=output.php?file="'.$tmp_dir.$file.'">'.$file."</a><br>");
and the output.php will have to do the following actions [check for errors plz]:
[output.php]
PHP Code:
<?
$file = $_GET['file'];
$ar = array();
$ar = file($file);
$content = join("\n",$ar);
print $content;
?>
this has to work with all textual files..
Bookmarks