# 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?
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
What is your version of ThinkPHP?