Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [ZendFramework]Problem z prostym formularzem
adolf1945
post
Post #1





Grupa: Zarejestrowani
Postów: 29
Pomógł: 0
Dołączył: 7.05.2010

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


Witam. Mam problem z prostym formularzem w Zend FW:
Wywala mi błąd: Fatal error: Class 'Application_Form_Osoba' not found in C:\xampp\htdocs\osoba\application\controllers\IndexController.php on line 8

Proszę o pomoc.

Wersja FW: Zend Framewok 1.11.7

application/forms/Osoba.php
  1. <?php
  2.  
  3. class Application_Form_Osoba extends Zend_Form
  4. {
  5.  
  6. public function init()
  7. {
  8. $this->addElement('text','imie', array('label'=>'Imię: '));
  9.  
  10. $kontrolka = new Zend_Form_Element_Text('nazwisko', array('label'=> 'Nazwisko: '));
  11. $this->addElement($kontrolka);
  12.  
  13. $this->addElement('Submit', 'zatwierdz', array('label'=>'Przetworz formularz'));
  14. }
  15.  
  16.  
  17. }
  18.  


IndexController:
  1. <?php
  2.  
  3. class IndexController extends Zend_Controller_Action
  4. {
  5.  
  6. public function indexAction()
  7. {
  8. $this->view->form = new Application_Form_Osoba();
  9. }
  10.  
  11.  
  12. }


widok index.phtml
  1. <?php echo $this->form; ?>


Layout:
  1. <!DOCTYPE...>
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
  3. <head>
  4. <title>Form</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. </head>
  7. <body>
  8.  
  9. <?php echo $this->layout()->content; ?>
  10.  
  11. </body>
  12. </html>
  13.  
  14.  
  15.  


Bootstrap:
  1. <?php
  2.  
  3. class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
  4. {
  5.  
  6. }


Błąd który wyświetla to: Fatal error: Class 'Application_Form_Osoba' not found in C:\xampp\htdocs\osoba\application\controllers\IndexController.php on line 8
to ta linijka: $this->view->form = new Application_Form_Osoba();

Z góry dziękuje za każdą pomoc

Ten post edytował adolf1945 17.11.2011, 11:38:36
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
adolf1945
post
Post #2





Grupa: Zarejestrowani
Postów: 29
Pomógł: 0
Dołączył: 7.05.2010

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


Działa, dziękuję. Myślałem że jest to ustawione gdzieś automatycznie
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 21.09.2025 - 10:52