Wednesday, July 05, 2006

Save File Diaglogue with PHP

Replace replace "saveme.zip" with the filename you want to save as... and "myziptosave.zip" with the actual path of the file on the server.


// name you wish to save file as
$filename = "saveme.zip";

// path to file you are saving
$filepath = "myziptosave.zip";

header('Content-Disposition: attachment; filename="'.$filename.'"');
readfile("$filepath ");
?>

0 Comments:

Post a Comment

<< Home