Teacher, when I was uploading pictures, it prompted me to upload files illegally.
若曦相依
若曦相依 2017-11-02 14:47:43
0
4
1858

QQ图片20171102144517.png

# if($_FILES['pic']['tmp_name'] , //Set the attachment upload size

$upload->exts = array('jpg', 'gif', 'png', 'jpeg');// Set the attachment upload type

$upload->rootPath ='./'; // Set the root directory for uploading attachments

$upload->savePath = './Public/Uploads/'; // Set the (sub)directory for uploading attachments

 Upload error message

$this->error($upload->getError()); #FOREACH ($ Info as $ File) {

Echo $ File ['Savepath']. $ FILE ['Savename']; >success('Upload successful!');

I don’t know how to solve it. Can the teacher help me?

若曦相依
若曦相依

reply all (2)
猪哥

Didn’t you already give an error message? ! ! You check the size, size, format, etc. of your image. If they all meet the requirements, then look at the code


  • reply The image size and format are all consistent
    若曦相依 author 2017-11-03 15:33:39
PeterZhu

What is your version of ThinkPHP?

  • reply TP3.2.3 version
    若曦相依 author 2017-11-03 09:12:34
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!