Bonjour,
Je suis en train de découvrir Doctrine 2
je suis actuellement un tuto trouvé sur un autre site.
Quand je souhaite créer la table j'ai toutes ces erreurs:
Notice: Undefined index: argv in D:\softs\UwAmp\www\Tests\Doctrine\Symfony\Component\Console\Input\ArgvInput.php on line 57
Call Stack
Warning: array_shift() expects parameter 1 to be array, null given in D:\softs\UwAmp\www\Tests\Doctrine\Symfony\Component\Console\Input\ArgvInput.php on line 61
Warning: Invalid argument supplied for foreach() in D:\softs\UwAmp\www\Tests\Doctrine\Symfony\Component\Console\Input\ArgvInput.php on line 242
Warning: Invalid argument supplied for foreach() in D:\softs\UwAmp\www\Tests\Doctrine\Symfony\Component\Console\Input\ArgvInput.php on line 265
Warning: Invalid argument supplied for foreach() in D:\softs\UwAmp\www\Tests\Doctrine\Symfony\Component\Console\Input\ArgvInput.php on line 265
Warning: Invalid argument supplied for foreach() in D:\softs\UwAmp\www\Tests\Doctrine\Symfony\Component\Console\Input\ArgvInput.php on line 265
j'ai ceci dans mon index.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 <?php require_once 'doctrine-dbal.php'; spl_autoload_register(array('Doctrine_Core', 'autoload')); require_once 'modeles/News.class.php'; ?> <?php // Si l'utilisateur ne possède pas de mot de passe, il faut faire directement « utilisateur@serveur ». $dsn = 'mysql://root@localhost/developpement'; $connexion = Doctrine_Manager::connection($dsn); try { $table = Doctrine_Core::getTable('News'); // On récupère l'objet de la table. $connexion->export->createTable($table->getTableName(), $table->getColumns()); // Puis, on la crée. echo 'La table a bien été créée'; } catch(Doctrine_Connection_Exception $e) { // Si une exception est lancée. echo $e->getMessage(); // On l'affiche. } ?>
merci d'avance pour votre aide
Partager