sorry,Thomas,here is the code,
<?php
class IndexController extends Zend_Controller_Action
{
/**
* upload action
*/
public function uploadAction()
{
$form = new Zend_Form();
$form->setEnctype('multipart/form-data');
$form->addElement('file','upload',array('label'=>'choose
file','destination'=>realpath('.')));
$form->upload->setDecorators(array('Label','File','Description','Errors'));
$form->addElement('submit','submit');
if ($this->_request->isPost() && $form->isValid($this->_request->getPost()))
{
$values = $form->getValues();
$form->upload->receive();
if ($form->upload->isUploaded()) {
echo 'upload succ';
} else {
echo 'upload fail';
}
}
$this->view->form = $form;
}
}
upload.phtml:
<?php echo $this->form; ?>
upload was succ,but get The file 'upload' was not found error message.
Best Regards
Jacky
2009/4/24 Thomas Weidner <[email protected]>
> Hi there,
>> when i update the latest zend framework from svn, then the form with file
>> element was failed when submit the form with a file to upload. It would
>> get
>> the error message like The file 'xxxxx' was not found . what's wrong with
>> it? How should i fixed it?
>>
>
> By providing your code to the list so people can see what you've done. ;-)
> Imagination is not always a good way to get proper help.
>
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
>