Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Błąd w instrukcji, co jest źle?
axwell
post 2.06.2008, 07:20:28
Post #1





Grupa: Zarejestrowani
Postów: 143
Pomógł: 1
Dołączył: 14.11.2007

Ostrzeżenie: (10%)
X----


Oto kawałek instrukcji napisanej przezemnie.
Najpierw definiuje zmienne:

  1. <?php
  2. $nazwapliku = 'glosy.php';
  3. $typots = $_GET[ots];
  4. ?>


następnie taki kod:

  1. <?php
  2. if($typots == ron)
  3.  {
  4. $plik = @fopen($nazwapliku);
  5. $ronglosy++;
  6. flock($plik, 2);
  7. fwrite($plik, $ronglosy);
  8. flock($plik, 3);
  9. fclose($plik);
  10.  }
  11. ?>


Wywala mi kilka błędów po kolei:
Warning: flock() expects parameter 1 to be resource, boolean given in C:\Program Files\WebServ\httpd\2\portal\vote.php on line 10

Warning: fwrite(): supplied argument is not a valid stream resource in C:\Program Files\WebServ\httpd\2\portal\vote.php on line 11

Warning: flock() expects parameter 1 to be resource, boolean given in C:\Program Files\WebServ\httpd\2\portal\vote.php on line 12

Warning: fclose(): supplied argument is not a valid stream resource in C:\Program Files\WebServ\httpd\2\portal\vote.php on line 13


Co robię źle?
Powód edycji: Dodaje tag /~strife/
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this 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: 25.07.2025 - 09:43