Précédent   Forum des professionnels en informatique > PHP > PHP & SGBD > PHP & MySQL
PHP & MySQL Forum d'entraide sur les fonctions MySQL avec PHP. Avant de poster -> FAQ MySQL, Cours MySQL et Sources MySQL. Pour les questions concernant le moteur MySQL plutôt que les fonctions PHP, merci d'utiliser le forum MySQL.
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 12/06/2011, 01h07   #1
Invité régulier
 
Inscription : novembre 2008
Messages : 86
Détails du profil
Informations forums :
Inscription : novembre 2008
Messages : 86
Points : 8
Points : 8
Par défaut problème dans include

bonjour;
Quand j'écris ce morceau de code en php :
Code :
1
2
3
4
5
 
<?php
include ("hospitalisation.php");
include ("Patient.php");
 ?>
il m'affiche un warning :
Citation:
Warning: include(hospitalisation.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\SiteProjets\fr\acces.php on line 2

Warning: include() [function.include]: Failed opening 'hospitalisation.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\SiteProjets\fr\acces.php on line 2

Warning: include(Patient.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\SiteProjets\fr\acces.php on line 3

Warning: include() [function.include]: Failed opening 'Patient.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\SiteProjets\fr\acces.php on line 3
j'ai cherché dans les forums pour trouver une solution mais j'ai rien trouvé.

merci de m'avoir aider
asprog est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/06/2011, 01h13   #2
Modérateur
 
Inscription : septembre 2010
Messages : 7 103
Détails du profil
Informations forums :
Inscription : septembre 2010
Messages : 7 103
Points : 8 466
Points : 8 466
et les deux fichiers sont bien dans le dossier C:\wamp\www\SiteProjets\fr ?
__________________
http://blog.stealth35.com/
stealth35 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/06/2011, 01h37   #3
Invité régulier
 
Inscription : novembre 2008
Messages : 86
Détails du profil
Informations forums :
Inscription : novembre 2008
Messages : 86
Points : 8
Points : 8
oui effectivement
asprog est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 13/06/2011, 20h38   #4
Nouveau Membre du Club
 
Inscription : juin 2004
Messages : 156
Détails du profil
Informations forums :
Inscription : juin 2004
Messages : 156
Points : 34
Points : 34
Hello,

essaye d’appeler cette fonction avant ton include.

Code :
1
2
3
4
5
6
7
8
9
 
function includeVerif($lien) {
    if (file_exists($lien)) {
      return $lien;
    }
    else {
      return false;
    }
  }
Code :
1
2
3
4
5
6
7
 
 
if(includeVerif("hospitalisation.php"))
  include ("hospitalisation.php");
 
if(includeVerif("Patient.php"))
  include ("Patient.php");
sirbaldur est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 00h49.


 
 
 
 
Partenaires

Hébergement Web