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

search for in the

Fonctions Bzip2> <Constantes pré-définies
Last updated: Fri, 14 Aug 2009

view this page in

Exemples

Cet exemple ouvre un fichier temporaire et y écrit une chaîne de test, puis, affiche le contenu de ce fichier.

Exemple #1 Petit exemple avec bzip2

<?php

$filename 
"/tmp/testfile.bz2";
$str "Ceci est une chaîne de test.\n";

// Ouvre un fichier en écriture
$bz bzopen($filename"w");

// Écrit une chaîne
bzwrite($bz$str);

// Ferme le fichier
bzclose($bz);

// Ouvre le fichier en lecture
$bz bzopen($filename"r");

// Lit 10 caractères
echo bzread($bz10);

// Affiche le contenu du fichier et on le ferme
echo bzread($bz);

bzclose($bz);

?>


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

Fonctions Bzip2> <Constantes pré-définies
Last updated: Fri, 14 Aug 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites