Zendフレームワークでファイルをアップロードしようとしています。私は自分のフォームでコードを次している:私は、NetBeansを使用していると私は、パブリックフォルダの下に1つのという名前のフォルダの画像を持っているZend FrameworkのZend_Form_Element_FileのsetDestinationメソッドで指定するパス
$this->addElementPrefixPath('App', 'App/');
$this->setName('upload');
$this->setAttrib('enctype', 'multipart/form-data');
$description = new Zend_Form_Element_Text('description');
$description->setLabel('Description')
->setRequired(true)
->addValidator('NotEmpty');
$file = new Zend_Form_Element_File('file');
$path="/images";
$file->setDestination($path)
->setLabel('File')
->setRequired(true)
->addValidator('NotEmpty');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel('Upload');
$this->addElements(array($description, $file, $submit));
。私はすべてのファイルが画像フォルダにアップロードされていることをしたいが、私はプロジェクトを実行するときには、
などのエラーは、指定した宛先はディレクトリではありません与えますか、私はそれをC:\Users\398853\Documents\NetBeansProjects\ZendWithFileUpload\public\images
としてフルパスを与える場合
存在しません。ファイルは画像フォルダにアップロードされます。しかし、私が与えるとき$path='/images'
それは上記のエラーを言う 'なぜ?与えられた道は何ですか?ありがとう。