?? ftp_download.php
字號:
<?PHP
//dirLIST v0.2.0 ftp file download script
set_time_limit(0);
require("config.php");
$file_path = base64_decode(rtrim($_GET['ftpf']));
//Check if file is valid
$ftp_stream = ftp_connect($ftp_host);
$ftp_login = ftp_login($ftp_stream, $ftp_username, $ftp_password);
$file_size = ftp_size($ftp_stream, $file_path);
if($file_size == -1)
{
echo "File does not exist";
exit;
}
//Check if file is valid -done
$fname = ereg_replace( ' +', '-', basename($file_path));
header('Cache-control: private');
header('Content-Type: application/octet-stream');
header('Content-Length: '.$file_size);
header('Content-Disposition: attachment; filename='.$fname);
readfile('ftp://'.$ftp_username.':'.$ftp_password.'@'.$ftp_host.'/'.$file_path);
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -