Einzelnen Beitrag anzeigen

Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#50

AW: [PHP] Klassenstruktur für Adressdatenbank

  Alt 22. Mär 2012, 20:02
Da stimmt aber irgendwas nicht:
Code:
Warning: include(MeineApp/Form/Address.php): failed to open stream: No such file or directory in /var/www/l3s11195/html/Admin/luckie/debug.php on line 27 Warning: include(MeineApp/Form/Address.php): failed to open stream: No such file or directory in /var/www/l3s11195/html/Admin/luckie/debug.php on line 27 Warning: include(): Failed opening 'MeineApp/Form/Address.php' for inclusion (include_path='.:/usr/share/php:app/:lib/') in /var/www/l3s11195/html/Admin/luckie/debug.php on line 27 Fatal error: Uncaught exception 'Exception' with message 'Cannot load class MeineApp_Form_Address from MeineApp/Form/Address.php' in /var/www/l3s11195/html/Admin/luckie/debug.php:29 Stack trace: #0 /var/www/l3s11195/html/Admin/luckie/debug.php(58): __autoload('MeineApp_Form_A...') #1 {main} thrown in /var/www/l3s11195/html/Admin/luckie/debug.php on line 29
Ich habe nur folgendes gemacht:
PHP-Quellcode:
/* $form = new MeineApp_Form_Irgendwas(array(
    'vorname' => "Valentin",
    'name' => "Voigt",
    'priv_email1' => "mail@..."
));

if ($form->is_valid()) {
    $a = new MeineApp_Model_Address($form->cleaned_data);
    $a->save();
} else {
    // ans View übergeben
    foreach ($form->fields as $field)
        echo implode("\n", $field->errors);
}*/


if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $form = new MeineApp_Form_Address($_POST);
    if ($form->is_valid()) {
        $address = new MeineApp_Model_Address($form->cleaned_data);
        $address->save();
        // redirect("/thanks/");
    }
} else {
    $form = new MeineApp_Form_Address();
}

$this->view->form = $form;
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat