can anyone make this code do another thing instead of jus read files i want it to be able to download files with tha .zip .exe extensions here the code
<?
if (! $id)
$id = "news";
function readingfile($test) {
if(!(file_exists("news/$test"))) {
echo "file doesnt exist.\n";
} else {
$testname = fopen("news/$test", "r");
if(!($testname)) {
echo "cant find read file\n";
} else {
$size = filesize("news/$test");
$read = fread($testname,$size);
echo "$read\n";
}
}
}
switch($id) {
case "news":
$test = "news.txt";
readingfile($test);
break;
}
?>