Including with zip files?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Pocketx
Forum Commoner
Posts: 37
Joined: Fri Aug 23, 2002 9:54 pm

Including with zip files?

Post by Pocketx »

Hello, I have this code so I can use it for downloading files

<?php
switch($download)
{
case '1':
include('./resources/backdrops/1.zip');
break;

default:
include('./blank.html');
break;

}
?>

But when i try index.php?download=1, it shows a bundent of words. Is this possible without using those browser heading stuff?
Last edited by Pocketx on Sun Feb 23, 2003 2:53 pm, edited 1 time in total.
RedDragon
Forum Newbie
Posts: 7
Joined: Wed Feb 19, 2003 3:16 pm
Contact:

Post by RedDragon »

you can try using javascript

Code: Select all

<?php

print <<<EOT
<script type="text/javascript" language="JavaScript">
function redirect() {
  window.location.replace("http://www.domain.com/file.zip");
}
setTimeout("redirect();", 2000);
</script>
EOT;

?>
User avatar
Pocketx
Forum Commoner
Posts: 37
Joined: Fri Aug 23, 2002 9:54 pm

Post by Pocketx »

But how do i link it so i can download it?

And i want it to be like ?download=1 ect.
Post Reply