|
Publicité ' | |||||||||||||||||||||||
|
|
#1 |
|
Membre éclairé
![]() ![]() Développeur Web Inscription : juin 2009 Messages : 363 ![]() |
Bonjour à tous !
Voilà j'ai un soucis d'include et j'aimerais savoir si je peux contrer ceci. Voici mon arborescence : home/ -----/lang/ ---------/decide-lang.php ---------/fr-lang.php ---------/en-lang.php -----/membre/ -------------/index.php -------------/profil.php -----/jeux/ ----------/jeux1/ ----------------/index.php -----/index.php -----/login.php -----/header.php -----/footer.php Donc dans mon header, j'appelle le fichier "lang/decide-lang.php". A noter que mon header et mon footer appelé à chaque page du site. Quand je reste dans le dossier home (login.php par exemple), mes variable sont bien présente. Mais si je vais sur le profil, ou dans le jeux1/index.php, mais variable ne sont plus présente, avec ce joli message : Warning: include(lang/fr-lang.php) [function.include]: failed to open stream: No such file or directory in home/lang/decide-lang.php on line 22 Warning: include() [function.include]: Failed opening 'lang/fr-lang.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/lang/decide-lang.php on line 22 Dans mon header, j'appelle pourtant bien "lang/decide-lang.php". Mais quand je suis dans index.php du jeux1, qui m'appelle mon header, je pense qu'il va rechercher dans jeux1/lang/fr-lang.php... Et forcément il ne trouve pas... Quelqu'un pourrait m'aider ? Merci d'avance ! |
|
00
|
|
|
#2 |
![]() ![]() Vincent Inscription : juillet 2005 Messages : 14 929 ![]() |
Tu peux partir de ta racine : /lang/decide-lang.php
ou $_SERVER['DOCUMENT_ROOT']/lang/decide-lang.php |
|
|
00
|
Copyright © 2000-2012 - www.developpez.com