Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problem, sesje
chacewicz
post 8.05.2007, 16:13:42
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 8.05.2007

Ostrzeżenie: (0%)
-----


mam problem z sesjami gdy prubuje uruchomic plik z sesjami
  1. <?php
  2. function checkPass($user, $pass)
  3. {
  4. if(!$fd=@fopen("./passwords/passwords.txt","r")) return false;
  5. while (!feof($fd)){
  6. $line=trim(Fgets($fd));
  7. if(($pos=strpos($line,":"))===false)continue;
  8. $tempUser=substr($line,0,$pos);
  9. if($tempUser!=user)continue;
  10. $tempPass=substr($lines,$pos+1,strlen($line)-$pos);
  11. fclose($fd);
  12. if($tempPass==$pass){
  13. return true;
  14. }
  15. else{
  16. return false;
  17. }
  18. }
  19. fclose($fd);
  20. return false;
  21. }
  22.  if(isSet($_SESSION['zalogowany'])){
  23. header("Location:glowna.php");
  24. exit();
  25. }
  26. else if(isSet($_POST["haslo"])&&isSet($_POST["nazwa"])&&chechPass($_POST["nazwa"],$_POST["haslo"])){
  27. $_SESSION ['zalogowany']=true;
  28. header("Location:glowna.php");
  29. exit();
  30. }
  31. ?>

wyswietla mi si blad ze nie mozna zapisac pliku sesji co zrobić
  1. Warning: open(/tmp\sess_24ccb23fe2a6a3db6da93761d3fd6d48, O_RDWR) failed: No such file or directory (2) in c:\phpdev5\www\ja\index.php on line 2
  2. >Warning: open(/tmp\sess_24ccb23fe2a6a3db6da93761d3fd6d48, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
  3.  
  4. Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

moj nr gg7905096
z gory dziekuje
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
kwiateusz
post 8.05.2007, 16:15:10
Post #2


Admin Techniczny


Grupa: Administratorzy
Postów: 2 071
Pomógł: 93
Dołączył: 5.07.2005
Skąd: Olsztyn




Problem to i ja mam np z Tobą...
Przeczytaj: Temat: Tematyka i zasady panujace na forum Przedszkole

A potem wyślij mi sensowny temat wraz z odpowiednim tagiem na PW a otworze temat...
Go to the top of the page
+Quote Post

Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 16:08