When calling a method within an object you should confirm (by IDE, API doc or simple reading) that it exists. These are OOP basics which a every programmer should be able to do.

Question:
What should Zend_Form do with setDestination?
What is "getvalues()"? Such a method does not exist.
What is $upload supposed to do? Calling a method on an uninitialised variable can not work

It seems that you are supressing all failures, otherwise you would have struggled at the line "setDestination" and also at "getvalues".

Please note:
"I will not make your code work"... it's your code and you should be able to find such simple errors yourself. I can give hints, but changing your code should be left to yourself ;-)

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message ----- From: "venkatadry" <[email protected]>
To: <[email protected]>
Sent: Thursday, March 18, 2010 9:20 AM
Subject: [fw-general] Re: File upload problem:(



@Thomas Weidner
thank u for ur concern sir after ur suggestion i have made some
modifications but still not working
===this is my file form===
<?php

class Application_Form_Fuldf extends Zend_Form
{
  public function init()
{
$this->setMethod('post');

$this->setAttrib('enctype', 'multipart/form-data');
$this ->addElement('file','file1',array('label'=>'File1'));
$this ->setDestination($_SERVER['DOCUMENT_ROOT'].'/fileupload/');
$submit = new Zend_Form_Element_Submit('submit');
$this ->addElement('submit','submit');

}

}

my upload action is
public function uploadAction()
   {
       // action body
$up = new Application_Form_Fuldf();
$this->view->form = $up;
    $a = $up->getvalues(file1);

if($this->getRequest()->isPost()) {
if($up->isValid($_POST)) {

  $files = $upload->getFileName();



}

   }

please make the code work

--
View this message in context: http://n4.nabble.com/File-upload-problem-tp663743p1597656.html Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to