壓縮函式庫

gzread

(PHP3 , PHP4)

gzread ---  讀取指定長度字串

語法 : string gzread (int zp, int length)

說明 : 

gzread( )從縮檔案指標fp讀取length位元組,當length位元組已讀取或是到達檔案的結尾時,讀取都將會停止。

Example :

<?php

    // get contents of a gz-file into a string 

    $filename = "/usr/local/something.txt.gz";

    $zd = gzopen ($filename, "r");

    $contents = gzread ($zd, 10000);

    gzclose ($zd);

?>

參考 : gzwrite( )  gzopen( )  gzgets( )  gzgetss( )  gzfile( )  gzpassthru( )


上一頁 首頁 下一頁