print_r($_FILES);
$filename = $_FILES['mxy']['name'];
$type = $_FILES['mxy']['type'];
$tmp_name = $_FILES['mxy']['tmp_name'];
$error = $_FILES['mxy']['error'];
$size = $_FILES['mxy']['size'];
move_uploaded_file($tmp_name,"wjimg/".$filename);
但是我这个代码 文件传不上去啊
$filename = $_FILES['mxy']['name'];
$type = $_FILES['mxy']['type'];
$tmp_name = $_FILES['mxy']['tmp_name'];
$error = $_FILES['mxy']['error'];
$size = $_FILES['mxy']['size'];
move_uploaded_file($tmp_name,"wjimg/".$filename);
但是我这个代码 文件传不上去啊
2016-07-27
老师讲错了,检测文件类型那里应该是检测文件是否以POST方式上传,其中用到的是$this->fileInfo['type']。我还发现检测上传文件是否为真实图片时,应该是$this->fileInfo['name'],而不是$this->fileInfo['tmp_name']。
2016-07-27