Under Zendframe, how do I obtain the uploaded files submitted in the template page form and save them?
Source: Internet
Author: User
Under Zendframe, how do I obtain and save the uploaded files submitted in the template page form? Under Zendframe and smarty, the form in the template requires file upload. I use the form inputtype = file to post the file to the controller path index. php? Controller = aaa & amp; act Zendframe how do I obtain and save the uploaded files submitted in the template page form?
Under Zendframe and smarty, the form in the template requires file upload. I use the form of input type = file to post the file to the controller path index. php? Controller = aaa & action =.
However, the result is in the stage of action = a in controller aaa,
[File] => Array
(
[Name] => test business license _s1.gif
[Type] => image/gif
[Tmp_name] => E: \ wamp \ tmp \ php88.tmp
[Error] => 0
[Size] = & gt; 5611
)
The temporary file E: \ wamp \ tmp \ php88.tmp cannot be found, so it cannot be used with move_uploaded_file ($ _ FILES ['file'] ['tmp _ name'], $ uploadfile.
However, if the zendframe mechanism is not used, only smarty is used, and the post path is written as aaa. php in the form on the template page, a temporary file can be obtained and saved. Why? how can this problem be solved?
------ Solution --------------------
Since zf is used, why not use the uploaded file class in zf to process it directly?
I have an article in my blog. you can refer to it.
Http://blog.csdn.net/a82168506/article/details/6347249
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service