require_once ' ' pour chaque fichier dans mon models
Bonjour, je souhaiterais bien configurer mon fichier index.php parce qu'actuellement, pour chaque fichier que j'ai dans mon répertoire 'models', je dois faire un require_once ' ' de celui-ci pour pouvoir l'utiliser sinon j'ai un message comme quoi ma classe n'existe pas.
Bizarrement, dans mon fichier index.php, je déclare bien l'endroit où est situé mon répertoire models:
Code:
1 2 3 4 5 6 7
| // Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../../Zend1.11/library'),
realpath(APPLICATION_PATH . '/models'),
realpath(APPLICATION_PATH . '/forms'),
get_include_path(),
))); |
Mon fichier index.php est situé à la racine du projet:
Citation:
. nomProjet
- application/
- library/
- public/
- test/
- index.php