je peux pas ouvrir une session et créer des variables de session j'ai toujours ces messages en exécution:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 Warning: session_start(): open(C:\Program Files\EasyPHP1-7\tmp\\sess_d83b7085a2910f48a6f1ac55c394505c, O_RDWR) failed: No such file or directory (2) in c:\program files\easyphp1-8\www\sp2c\connexion.php on line 40 Warning: Unknown(): open(C:\Program Files\EasyPHP1-7\tmp\\sess_d83b7085a2910f48a6f1ac55c394505c, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\Program Files\EasyPHP1-7\tmp\) in Unknown on line 0
et voici mon code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 $query = "Select * From users where Log = '".$_POST['PHP_AUTH_USER']."' and Pass = '".$_POST['PHP_AUTH_PW']."'"; $resultat = mysql_query($query); if(mysql_num_rows($resultat) != 0) { $id_user = $resultat['id']; $log = $resultat['Log']; $pass = $resultat['Pass']; session_start(); $_SESSION['last_access']=time(); $_SESSION['id_user'] = $id_user; $_SESSION['Log'] = $log; $_SESSION['Pass'] = $pass; }
Partager