Probem avec php

Fermé
guilod Messages postés 2 Date d'inscription samedi 30 mai 2009 Statut Membre Dernière intervention 7 juin 2009 - 7 juin 2009 à 18:59
Atropa Messages postés 1940 Date d'inscription mercredi 25 juin 2008 Statut Membre Dernière intervention 11 mai 2014 - 8 juin 2009 à 04:00
Bonjour,
j'ai bien configuré mon serveur wamp pour lire les scripts php mais helas voici ce que je reçois:

do_html_header('Problem:'); echo 'You not loged in.
'; do_html_url('login.php', 'Login'); do_html_footer(); exit; } } function change_password($username, $old_password, $new_password){ login($username, $old_password); $conn=db_connect(); $result=$conn->query("update user set passwd=sha1('".$new_password."') where username='".$username."'"); if(!$result){ throw new Exception('Password could not changed'); } else { return true; } } function reset_password($username){ $new_password=get_random_word(6, 13); if($new_password==false){ throw new Exception('Mot de passe incorrect'); } $rand_number=rand(0, 999); $new_password .=$rand_number; $conn=db_connect(); $result=$conn->query("update user set passwd=sha1('".$new_password."') where username='".$username."'"); if(!$result) { throw new Exception('could not change password'); } else { return $new_password; } } function get_random_word($min_length, $max_length) { $word=''; $dictionary="c:\wamp\dict\words"; $fp=@fopen($dictionary, 'r'); if(!$fp){ return false; } $size=filesize($dictionary); $rand_location=rand(0, $size); fseek($fp, $rand_location); while((strlen($word) < $min_length) || (strlen($word)>$max_length) || (strstr($word, "'"))){ if(feof($fp)){ fseek($fp, 0); } $word=fgets($fp, 80); $word$fgets($fp, 80); } $word=trim($word); return $word; } function notify_password($username, $password){ $conn=db_connect(); $result=$conn->query("select email from user where username='".$username."'"); if(!$result){ throw new Exception('Could not find email'); } else if ($result->num_rows==0) { throw new Exception('Could find email adress'); } else { $row=$result->fetch_object(); $email=$row->email; $from="From: support@bookmark\r\n"; $mesg="Your PHPBookmak".$password."\r\n" ."Please change it next time.\r\n"; if(mail($email, 'PHPBookmark information', $mesg, $form)){ return true; } else { throw new Exception('Could not send email.'); } } } ?>
c'est comme ci mon serveur ne lit pas un fichier php, veuillez m'aider s'il vous plait
A voir également:

1 réponse

Atropa Messages postés 1940 Date d'inscription mercredi 25 juin 2008 Statut Membre Dernière intervention 11 mai 2014 274
8 juin 2009 à 04:00
bonsoir,

tu passes par localhost? ou tu ouvre le fichier directement avec ton navigateur?

il faut tes fichiers php dans le répetoire www de wamp

ensuite pour tester le fichier tu clic sur wamp / localhost

et sur la page qui vient dans ton navigateur tu cherche ton fichier dans l'arborescence

et un conseil si tu fais des sites utilise firefox avec les add ons firebug, web developer et html validator
0