Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> txtbb
conradinho
post
Post #1





Grupa: Zarejestrowani
Postów: 34
Pomógł: 0
Dołączył: 4.10.2005

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


używam wyżej wymienionego programu i pojawił mi się taki błąd.

Warning: filesize(): Stat failed for html/checkbox.html (errno=2 - No such file or directory) in /var/www/sites/yoyo.pl/c/l/clasic/forum/futils.php on line 123


nie za bardzo kojaże o co chodzi a nie chce się niepotrzebnie bawic ponieważ nie chciałbym stracic tego forum z raci że już na nim coś jest...

bardzo prosiłbym o pomoc.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
conradinho
post
Post #2





Grupa: Zarejestrowani
Postów: 34
Pomógł: 0
Dołączył: 4.10.2005

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


wielkie dzieki.

hmm tylko co z tym zrobic:/ bo w pliku futils.php nie ma nic o checkbox.html

Kod
<?
  // =========================
  //    OPERACJE NA PLIKACH
  // -------------------------
  
  function file_DeleteLine ($filename, $index) {
    $file = file ($filename);

    $fp = fopen ($filename, "w");
    flock($fp, LOCK_EX);
    for( $w = 0; $w < count($file); $w++ )
    {
      if ($index <> $w)
        fwrite ($fp, $file[$w]);
    }
    flock($fp, LOCK_UN);
    fclose($fp);
  }

  function file_UpdateLine ($filename, $index, $line) {
    $file = file ($filename);
    $file[$index] = $line . "\r\n";

    $fp = fopen ($filename, "w");
    flock($fp, LOCK_EX);
    for( $w = 0; $w < count($file); $w++ )
    {
      fwrite ($fp, $file[$w]);
    }
    flock($fp, LOCK_UN);
    fclose($fp);
  }

  function file_GetLine ($filename, $index) {
    $file = fopen ($filename, "r");
    $line = -1;
    while (!feof ($file)) {
      $buffer = fgets($file, 4096);
      $line++;
      if ($line == $index) {
        fclose ($file);
        return $buffer;
      }
    }
    fclose ($file);
  }

  function file_LinesCount ($filename) {
    if (file_exists($filename)) {
      if (filesize($filename) < 500000) {
        $file = file($filename);
        return count($file);
      } else {
        $file = fopen($filename, 'r');
        while (!feof ($file)) {
          fgets($file, 4096);
        $lines++;
        }
        fclose ($file);
        return $lines - 1;
      }
    } else return 0;
  }

  function file_ReplaceLines ($filename, $from, $to) {
    $file = file ($filename);

    $line = $file[$from];
    $file[$from] = $file[$to];
    $file[$to] = $line;

    $fp = fopen ($filename, "w");
    flock($fp, LOCK_EX);
    for( $w = 0; $w < count($file); $w++ )
    {
      fwrite ($fp, $file[$w]);
    }
    flock($fp, LOCK_UN);
    fclose($fp);
  }

  function file_InsertLine ($filename, $line) {
    $fp = fopen ($filename, "a");
    flock($fp, LOCK_EX);
    fputs ($fp, $line . "\r\n");
    flock($fp, LOCK_UN);
    fclose ($fp);
  }

  function file_InsertLineOnTop ($filename, $line) {
    if (file_exists($filename)) {
      $fp = fopen ($filename, "r");
      if (filesize($filename) > 0) {
        $old_file = fread($fp, filesize($filename));
      }
      fclose ($fp);
    }

    $fp = fopen ($filename, "w");
    flock ($fp, LOCK_EX);
    $file = $line . "\r\n" . $old_file;
    $file = str_replace ("\r\n\r\n", "\r\n", $file);
    fputs ($fp, $file);
    flock ($fp, LOCK_UN);
    fclose ($fp);
  }

  function file_MoveLineToTop ($filename, $index) {
    $line = file_GetLine($filename, $index);
    file_DeleteLine($filename, $index);
    file_InsertLineOnTop($filename, $line);
  }

  function file_SaveToFile ($filename, $something) {
    $fp = fopen ($filename, "w");
    flock($fp, LOCK_EX);
    fputs ($fp, $something);
    flock($fp, LOCK_UN);
    fclose ($fp);
  }

  function file_ReadFromFile ($filename) {
    if (filesize($filename) > 0) {
      $fp = fopen ($filename, "r");
      $file = fread($fp, filesize ($filename));
      fclose ($fp);
      return $file;
    }
  }

  function file_CreateFile ($filename) {
    $fp = fopen ($filename, "w");
    fclose ($fp);
  }
?>


to jest cały kod pliku futils...
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 8.10.2025 - 05:46