quote:
Originally posted by Segosa
You can save it as .phps (s = source) which shows them syntax-highlighted source code and the script isn't parsed..
and if your server dosnt support that use a script like this
code:
<?
$file = $_GET['file'];
if(isset($file)){
$file = "./$file";
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=$file");
$pic = fopen($file,'r');
$php = fread($pic,filesize($file));
fclose($pic);
echo $php;
}else{
echo "blah";
}
?>
which will take ?file=filename on the url then ask the user if they wish to download the file , this will only download files from the same directory the script is in.