Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][Zend Framework] Forumlarz nie może znaleźć folderu
sweter
post 18.06.2010, 14:42:08
Post #1





Grupa: Zarejestrowani
Postów: 623
Pomógł: 11
Dołączył: 1.01.2009
Skąd: Wrocław

Ostrzeżenie: (0%)
-----


Witam,
mam taki fragment kodu odpowiedzialnego za tworzenie formularza:
  1. $this->addElement('file', 'uploadFile', array(
  2. 'destination' => APPLICATION_PATH.'/tmp',
  3. 'validators' => array(
  4. array('count', false, 1), // ile plików możma wysłać jednocześnie?
  5. array('size', false, 102400), // maxymalny rozmiar pliku
  6. ),
  7. 'label' => 'Wyślij plik:'
  8. ));

W 2. linijce mam wskazać gdzie powinien być katalog "tmp". Domyślam się, że APPLICATION_PATH wskazuje na główny folder aplikacji (czyli tam gdzie są katalogi "application", "library" i "public").

Niestety wywala mi błąd:
Kod
Fatal error: Uncaught exception 'Zend_File_Transfer_Exception' with message 'The given destination is not a directory or does not exist' in /var/www/treetime/library/Zend/File/Transfer/Adapter/Abstract.php:1028 Stack trace: #0 /var/www/treetime/library/Zend/Form/Element/File.php(509): Zend_File_Transfer_Adapter_Abstract->setDestination('APPLICATION_PAT...', 'uploadFile') #1 /var/www/treetime/library/Zend/Form/Element.php(359): Zend_Form_Element_File->setDestination('APPLICATION_PAT...') #2 /var/www/treetime/library/Zend/Form/Element.php(253): Zend_Form_Element->setOptions(Array) #3 /var/www/treetime/library/Zend/Form.php(1078): Zend_Form_Element->__construct('uploadFile', Array) #4 /var/www/treetime/library/Zend/Form.php(1009): Zend_Form->createElement('file', 'uploadFile', Array) #5 /var/www/treetime/application/models/AddPhoto.php(11): Zend_Form->addElement('file', 'uploadFile', Array) #6 /var/www/treetime/library/Zend/Form.php(235): AddPhoto->init() #7 /var/www/treetime/application/controllers/AddController.php(48): Ze in /var/www/treetime/library/Zend/File/Transfer/Adapter/Abstract.php on line 1028


Co zrobić?


--------------------
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 24.07.2025 - 23:00