Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[debutant] probleme: no such file or directory ... (include)

1 réponse
Avatar
eric lecocq
bonjour,

j'ai un petit problème:

Warning: main(../connexion.inc.php): failed to open stream: No such file or
directory in c:\webserver\www\inscription.php on line 38

Warning: main(): Failed opening '../connexion.inc.php' for inclusion
(include_path='.;C:\webserver\php\pear\;c:\webserver\www\') in
c:\webserver\www\inscription.php on line 38

voici le code incriminé:
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Inscription au club</title>
</head>
<body>
Pour vous inscrire, remplissez le formulaire
<form name="form1" method="post" action="">
<table width="50%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="57%">Votre Pr&eacute;nom</td>
<td width="43%">
<input type="text" name="prenom">
</td>
</tr>
<tr>
<td width="57%">Votre adresse e-mail</td>
<td width="43%">
<input type="text" name="email">
</td>
</tr>
<tr>
<td width="57%">Votre code postal</td>
<td width="43%">
<input type="text" name="code_postal">
</td>
</tr>
<tr>
<td width="57%">La ville o&ugrave; vous vivez</td>
<td width="43%">
<input type="text" name="ville">
</td>
</tr>
<tr>
<td width="57%">Votre Pays </td>
<td width="43%">
<?
include '../connexion.inc.php';

$sql="select * from pays";
$resultat=@mysql_db_query('test', $sql, $id_link);
echo '<select name="pays">';
echo '<option value="" selected></option>';
while ($rang=mysql_fetch_array($resultat)){
$code=$rang['code'];
$nom=$rang['nom'];
echo "<option value=\"$code\">$nom</option>";
}
echo '</select>';
?>
<select name="select">
<option> </option>
<option>Canada</option>
<option>Belgique</option>
</select>
</td>
</tr>
<tr>
<td width="57%">&nbsp;</td>
<td width="43%">
<input type="submit" name="Submit" value="Je m'inscris">
</td>
</tr>
</table>
</form>
</body>
</html>

1 réponse

Avatar
Olivier Miakinen

bonjour,

j'ai un petit problème:

Warning: main(../connexion.inc.php): failed to open stream: No such file or
directory in c:webserverwwwinscription.php on line 38

Warning: main(): Failed opening '../connexion.inc.php' for inclusion
(include_path='.;C:webserverphppear;c:webserverwww') in
c:webserverwwwinscription.php on line 38

voici le code incriminé:
[...]
<?
include '../connexion.inc.php';


Petite traduction : « no such file or directory » signifie que le
fichier ou le répertoire n'existe pas.

Vérifie donc que tu as bien un fichier référençable par
c:/webserver/web/../connexion.inc.php c'est-à-dire par
c:/webserver/connexion.inc.php