单文件多文件完美上传类(完成案例):
http://www.cnblogs.com/xiaogou/p/8977647.html
http://www.cnblogs.com/xiaogou/p/8977647.html
2018-05-01
<?php
$filename=$_GET['filename'];
header("content-disposition:attachment;filename=".basename($filename));//告诉浏览器通过附件的形式处理文件
header('content-length:'.filesize($filename));//下载文件的大小
readfile($filename);//读取文件的内容
每一项都需要,去掉的话下载的文件就不正常,我测试过!
$filename=$_GET['filename'];
header("content-disposition:attachment;filename=".basename($filename));//告诉浏览器通过附件的形式处理文件
header('content-length:'.filesize($filename));//下载文件的大小
readfile($filename);//读取文件的内容
每一项都需要,去掉的话下载的文件就不正常,我测试过!
2018-04-30
调试好了,这些都要定义下;
protected $fileName;
protected $maxSize;
protected $allowMime;
protected $allowExt;
protected $uploadPath;
protected $imgFlag;
protected $fileInfo;
protected $error;
protected $ext;
protected $uniName;
protected $destination;
protected $fileName;
protected $maxSize;
protected $allowMime;
protected $allowExt;
protected $uploadPath;
protected $imgFlag;
protected $fileInfo;
protected $error;
protected $ext;
protected $uniName;
protected $destination;