Problème PHP
G1bp
-
G1bp -
G1bp -
Bonjour, j'ai un bug php qui ne devrait pas être posé !
Voilà, j'ai un fichier .html où en rentre le pseudo et le mdp.
On clique sur connexion, direction mon fichier php qui produit ça : (En + une DB)
La DB contient : j;*;*;...
Pour tout les clients ! Mais quelles codes produit l'erreur ? svp
Merci d'avance !
Voilà, j'ai un fichier .html où en rentre le pseudo et le mdp.
On clique sur connexion, direction mon fichier php qui produit ça : (En + une DB)
<html>
<title>Connexion <?php echo $_POST['pseudo']; ?> !</title>
<script language="javascript">
<!--
function load()
{
window.location="Narvak.html";
exit
}
//-->
</script>
<?php
$file = "use.cfg";
$content = file_get_contents($file,'r');
$content = explode(";", $content);
$ps = $_POST['pseudo'];
$mdp = $_POST['mdp'];
$i = 0;
$fin=count($content)-1;
load();
function load()
{
$vip = $content[$i];
if ($ps == $vip)
{
$j = $i+1;
$vt = $content[$j];
if ($vt == $mdp)
{
$j = $i-1;
$vt = $content[$j];
if ($vt == "j")
{
echo "<body background='background.jpg'>";
fclose($content);
exit();
}
else
{
echo "Tentative de HACK éliminé ! <a href='Narvak.html'>Retour</a>";
fclose($content);
exit();
}
}
else
{
echo "<p>Erreur de mots de passe ! <a href='Narvak.html'>Retour</a>";
fclose($content);
exit();
}
}
else
{
if ($i > $fin)
{
echo "<p>Erreur de Pseudo ! <a href='Narvak.html'>Retour</a>";
fclose($content);
exit();
}
else
{
$i = $i+1;
load();
}
}
}
?>
</html>
La DB contient : j;*;*;...
Pour tout les clients ! Mais quelles codes produit l'erreur ? svp
Merci d'avance !
A voir également:
- Problème PHP
- Easy php - Télécharger - Divers Web & Internet
- Expert php pinterest - Télécharger - Langages
- Retour a la ligne php - Forum Webmastering
- Alert php - Forum PHP
- Retour a la ligne php ✓ - Forum PHP
1 réponse
Voici l'erreur qu'affiche mon éditeur php :
Session de débogage commencée.
Informations: PHPDocument1 ligne 2 - Undefined index: pseudo
Avertissement de débogage: PHPDocument1 ligne 14 - file_get_contents(use.cfg) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory
Informations: PHPDocument1 ligne 16 - Undefined index: pseudo
Informations: PHPDocument1 ligne 17 - Undefined index: mdp
Informations: PHPDocument1 ligne 24 - Undefined variable: i
Informations: PHPDocument1 ligne 24 - Undefined variable: content
Informations: PHPDocument1 ligne 25 - Undefined variable: ps
Informations: PHPDocument1 ligne 27 - Undefined variable: i
Informations: PHPDocument1 ligne 28 - Undefined variable: content
Informations: PHPDocument1 ligne 29 - Undefined variable: mdp
Informations: PHPDocument1 ligne 31 - Undefined variable: i
Informations: PHPDocument1 ligne 32 - Undefined variable: content
Informations: PHPDocument1 ligne 42 - Undefined variable: content
Avertissement de débogage: PHPDocument1 ligne 42 - fclose(): supplied argument is not a valid stream resource
Session de débogage terminée.
Merci d'avance
Session de débogage commencée.
Informations: PHPDocument1 ligne 2 - Undefined index: pseudo
Avertissement de débogage: PHPDocument1 ligne 14 - file_get_contents(use.cfg) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory
Informations: PHPDocument1 ligne 16 - Undefined index: pseudo
Informations: PHPDocument1 ligne 17 - Undefined index: mdp
Informations: PHPDocument1 ligne 24 - Undefined variable: i
Informations: PHPDocument1 ligne 24 - Undefined variable: content
Informations: PHPDocument1 ligne 25 - Undefined variable: ps
Informations: PHPDocument1 ligne 27 - Undefined variable: i
Informations: PHPDocument1 ligne 28 - Undefined variable: content
Informations: PHPDocument1 ligne 29 - Undefined variable: mdp
Informations: PHPDocument1 ligne 31 - Undefined variable: i
Informations: PHPDocument1 ligne 32 - Undefined variable: content
Informations: PHPDocument1 ligne 42 - Undefined variable: content
Avertissement de débogage: PHPDocument1 ligne 42 - fclose(): supplied argument is not a valid stream resource
Session de débogage terminée.
Merci d'avance