header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="ITblog.zip"');
header('Content-Transfer-Encoding: binary');
readfile('test.zip');
完整的代码应该是这样
header('Content-Disposition: attachment; filename="ITblog.zip"');
header('Content-Transfer-Encoding: binary');
readfile('test.zip');
完整的代码应该是这样
2017-11-11
<?php
print_r($_FILES);
$filename=$_FILES["myfile"]['name'];
$type=$_FILES['myfile']['type'];
$tmp_name=$_FILES['myfile']['tmp_name'];
$size=$_FILES['myfile']['size'];
$error=$_FILES['myfile']['error'];
copy($tmp_name,'upload/'.iconv("UTF-8","gbk",$filename));
?>
print_r($_FILES);
$filename=$_FILES["myfile"]['name'];
$type=$_FILES['myfile']['type'];
$tmp_name=$_FILES['myfile']['tmp_name'];
$size=$_FILES['myfile']['size'];
$error=$_FILES['myfile']['error'];
copy($tmp_name,'upload/'.iconv("UTF-8","gbk",$filename));
?>
2017-10-12
别人远程服务器的文件不会给权限你修改的好吧 所以想修改网页上的代码是不可能的 老师这是本地的文件 自己有修改权限
2017-10-07