2010年8月6日星期五

[fw-db] setDestination in Zend_Form_Element_File

I try to upload a file to a directory using setDestination but the file ends op in /tmp, whatever I try. Here's my code: class forms_ImportForm extends Zend_Form { public function __construct($options = null) { parent::__construct($options); $this->setName('import'); $uploadFile = new Zend_Form_Element_File('extract'); $uploadFile->setLabel('File') ->setDestination(APPLICATION_PATH ."/../data"); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Uploaden'); $this->addElements(array($uploadFile, $submit)); } } The method is called because the label is displayed and if I mutilate the file location I get an error. Any suggestions greatly appreciated. Timmo

View this message in context: setDestination in Zend_Form_Element_File
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: