Skip to content
Go to file
Cannot retrieve contributors at this time
23 lines (23 sloc) 860 Bytes
if ( isset($_GET['file']) && $_GET['file'] != '' )
$get_param = 'file';
header("Content-Type: application/octet-stream");
header("content-disposition: attachment; filename=\"{$_GET[$get_param]}\"");
else { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<title>Download an Empty File</title>
<p>Use this form to download an empty file of the name you specify. This is useful for when you are unable to name file in Windows starting with a dot and don't want to get out the command prompt to do it manually.</p>
<form method="get" action="./f.php">
<label for="file">Filename:</label> <input type="text" name="file" id="file" /> <input type="submit" value="Download" />
<?php } ?>
You can’t perform that action at this time.