|
użytkowników online: 53
|
OPINIE UŻYTKOWNIKÓW
|
Przyznam, że jestem pod sporym wrażeniem. Od wielu lat zajmuje się grafiką przeznaczoną do druku ze szczególnym uwzględnieniem opakowań. Z radością stwierdzam, iż twórca serwisu jest moim ulubionym typem potencjalnego współpracownika (choć branża troszeczkę inna) tzn. pada pytanie i błyskawicznie pada konkretna odpowiedź bez względu na stopień skomplikowania pytania. Gorąco polecam współpracę, gdyż macie pewność że nie zostaniecie potraktowani sloganami typu "oczywiście", "nie ma sprawy" tylko otrzymacie konkretną pomoc. Tak trzymać! Na pewno jeszcze nie raz skorzystam
Paweł
Studio Gama
|
|
PODRĘCZNIK PHP 5.x, 4.x, 3.x - częściowo spolszczony / źródło: www.php.net
[Spis]
[A]
[B]
[C]
[D]
[E]
[F]
[G]
[H]
[I]
[J]
[K]
[L]
[M]
[N]
[O]
[P]
[Q]
[R]
[S]
[T]
[U]
[V]
[X]
[W]
[Z]
gzgets (PHP 3, PHP 4, PHP 5) gzgets -- Get line from file pointer Opisstring gzgets ( resource zp, int length )
Gets a (uncompressed) string of up to length - 1 bytes read from the given
file pointer. Reading ends when length - 1 bytes have been read, on a
newline, or on EOF (whichever comes first).
Parametry
- zp
The gz-file pointer. It must be valid, and must point to a file
successfully opened by gzopen().
- length
The length of data to get.
Zwracane wartości
The uncompressed string, or FALSE on error.
Przykłady
Przykład 1. gzgets() example |
<?php
$handle = gzopen('somefile.gz', 'r');
while (!gzeof($handle)) {
$buffer = gzgets($handle, 4096);
echo $buffer;
}
gzlose($handle);
?>
|
|
User Contributed Notes04-Aug-2005 08:21
For the above example by VIJAY, using gzgetc would be better, as I've encountered binary/text file incompatibilities (at least with PHP 4.0.4).
prismngp1 at yahoo dot com
10-Aug-2002 02:19
<?
$file = "/absolute/path/to/your/file" ;
$fp = fopen("$file", "w") ;
$filename = "filename.gz" ;
$zp = gzopen($filename, "r");
if ($zp)
{
while (!gzeof($zp))
{
$buff1 = gzgets ($zp, 4096) ;
fputs($fp, $buff1) ;
}
}
gzclose($zp) ;
fclose($fp) ;
?>
|