Service de colorisation de codes sources - CodesWall.info
Php
> Dezipper en PHP
Titre
Dezipper en PHP
Postée le
08-03-2010
Affichée
220
Mini-lien
Description
Dezipper en PHP
Etat
Ne contient pas d'erreurs.
Code d'insertion
Options
Téléchargement
function
unzip
(
$in
,
$out
)
{
$zip
=
zip_open
(
$in
)
;
if
(
!
$zip
)
{
return
false
;
}
else
{
while
(
$zip_entry
=
zip_read
(
$zip
)
)
{
$fp
=
fopen
(
$out
.
"/"
.
zip_entry_name
(
$zip_entry
)
,
"w"
)
;
if
(
zip_entry_open
(
$zip
,
$zip_entry
,
"r"
)
)
{
$buf
=
zip_entry_read
(
$zip_entry
,
zip_entry_filesize
(
$zip_entry
)
)
;
fwrite
(
$fp
,
"$buf"
)
;
zip_entry_close
(
$zip_entry
)
;
fclose
(
$fp
)
;
}
}
zip_close
(
$zip
)
;
}
return
true
;
}
Poster votre code-source
Catégorie *
-
Php
javascript
CSS
HTML
Xml
Perl
C
C++
Java
VB.Net
Script Batch
C#.Net
Visual Basic
VBA
Shell
mIRC
Latex
OCaml
pascal
MySQL
MatLab
Fichier .ini
SmallTalk
Autre
Titre *
(50 car. max)
Description *
(200 car. max)
Le code
Fonctionne
Ne fonctionne pas
Je ne sais pas
Source *
function unzip( $in, $out ) { $zip = zip_open( $in ); if( ! $zip ) { return false; } else { while ( $zip_entry = zip_read($zip) ) { $fp = fopen( $out."/".zip_entry_name($zip_entry), "w" ); if (zip_entry_open($zip, $zip_entry, "r")) { $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); fwrite($fp,"$buf"); zip_entry_close($zip_entry); fclose($fp); } } zip_close($zip); } return true; }
* : Champs obligatoires
Fermer
Accueil
Poster
Actualités
Règles
Contact
Partenaires
Infos / Aide
Php
(50)
javascript
(26)
CSS
(10)
HTML
(8)
Xml
(10)
Perl
(5)
C
(33)
C++
(29)
Java
(38)
VB.Net
(2)
Script Batch
(6)
C#.Net
(2)
Visual Basic
(4)
VBA
(3)
Shell
(4)
mIRC
(1)
Latex
(3)
OCaml
(3)
pascal
(4)
MySQL
(12)
MatLab
(1)
Fichier .ini
(6)
SmallTalk
(1)
Autre
(12)
\n