Hai. J'ai un site qui est vraiment bizarre, et qui me cause des problèmes. Cette est structure simplifiéeInclure chemin et structure étrange
public_html
- adm
--- raport
------ raportpdf.php
--- class
------ Bonus
--------- Bonus_DAO.class.php
------ config.php
--- raport.php
- index.php
So. Index.php est un chargeur géant. Il a des lignes: (mais je ne pense pas qu'ils font diffrence)
set_include_path('lib/DB' . PATH_SEPARATOR . get_include_path());
set_include_path('lib/PHPLOT' . PATH_SEPARATOR . get_include_path());
set_include_path('config' . PATH_SEPARATOR . get_include_path());
set_include_path('view' . PATH_SEPARATOR . get_include_path());
set_include_path('controller' . PATH_SEPARATOR . get_include_path());
set_include_path('model' . PATH_SEPARATOR . get_include_path());
intérieur Bonus_DAO.class.php est quelque chose comme
require_once('./adm/class/config.php');
Raportpdf.php est appelé par index.php - il envoie son contenu sans aucune erreur au courrier. Mais quand je veux accéder raport.php, j'ai erreur comme:
Warning: require_once(./adm/class/config.php) [function.require-once]: failed to open stream: No such file or directory in /home/panele/domains/blahblah/public_html/adm/class/Bonus/Bonus_DAO.class.php on line 2
Fatal error: require_once() [function.require]: Failed opening required './adm/class/config.php' (include_path='.:/usr/local/lib/php') in /home/panele/domains/blahblah/public_html/adm/class/Bonus/Bonus_DAO.class.php on line 2
Comment puis-je résoudre ce problème?
Merci! Il fonctionne comme un charme. – Misiur