PHP
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Bzip2 関数> <定義済み定数
Last updated: Fri, 09 Jan 2009

view this page in

この例は、テンポラリファイルをオープンし、テスト用の文字列を書き込みます。 この後、このファイルの内容を出力します。

例1 簡単な bzip2 の例

<?php

$filename 
"/tmp/testfile.bz2";
$str "This is a test string.\n";

// 書き込み用にオープン
$bz bzopen($filename"w");

// ファイルに文字列を書き込む
bzwrite($bz$str);

// ファイルを閉じる
bzclose($bz);

// 読み込み用にファイルをオープン
$bz bzopen($filename"r");

// 10文字読み込む
echo bzread($bz10);

// ファイルの終端まで出力(または次の1024文字)し、閉じる
echo bzread($bz);

bzclose($bz);

?>


add a note add a note User Contributed Notes
There are no user contributed notes for this page.

Bzip2 関数> <定義済み定数
Last updated: Fri, 09 Jan 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites