hallo, kukol som na tu Tvoju stranku a si narodena presne v ten den ako nase dvojcata. Nenarodila si sa nahodou na Sulekovej? Ak ano, tak sa poznas s mojimi detmi uz cely zivot.
Ale k veci:
ak chces rozbalit na stranke zip, tak si saveni tento script fileextract.php a ked ho nastartujes rozbali Ti ten zip na servri. Na webzdarma mi to chodi.
<?
function unzip($file, $path) {
$zip = zip_open($file);
if ($zip) {
while ($zip_entry = zip_read($zip)) {
if (zip_entry_filesize($zip_entry) > 0) {
$complete_path = $path.dirname(zip_entry_name($zip_entry));
$complete_name = $path . zip_entry_name($zip_entry);
if(!file_exists($complete_path)) {
$tmp = '';
foreach(explode('/',$complete_path) AS $k) {
$tmp .= $k . '/';
if(strlen($tmp) > strlen(getcwd())) { //produce only subdirs
if(!file_exists($tmp)) {
mkdir($tmp, 0777);
}
}
}
}
if (zip_entry_open($zip, $zip_entry, "r")) {
$fd = fopen($complete_name, 'w');
fwrite($fd, zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)));
fclose($fd);
zip_entry_close($zip_entry);
}
}
}
zip_close($zip);
}
}
?>
<BODY>
<?
$zip_file_name=$_POST["name"];
if(strlen($zip_file_name) > 1)
{
$curdir = getcwd();
//unzip($curdir . "/tmp.zip",$curdir . "/");
unzip($curdir . "/" . $zip_file_name,$curdir . "/");
}
?>
<form method="POST">
Filename: <input type="text" name="name" />
<input type="submit">
</form>
</BODY>
teraz vidim, ze to tu uplne zmenilo formatovanie. ak ten script chces v originale, napis mail a poslem ti ho.