I am trying to upload a file using Zend Framework 1.7.4, but have not been successful. I have read Akrabat's tutorial, which was helpful but when i used those techniques in my project I was not able to get it to work.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
You can set any destination example $photo->setLabel('Photo:')->setDestination(APPLICATION_PATH ."/../data");
Don't forget to set the
enctype
attribute of the form to "multipart/form-data
". If you are using Zend_Form, callAlso note that
Zend_Form::setDestination
is deprecated, use the rename filter for that:The link you posted is just a general Zend Framework tutorial, and hasn't been updated past ZF 1.5.
Anyway, once you get started with Zend, this is a sample of the code you would use to receive an upload. The form doing the posting must have the correct file upload components.