[Php-it] Gestire gli archivi con php...
Alessandro Marinuzzi
alecosnet at inwind.it
Fri Jun 8 19:15:54 CEST 2007
Cristiano Verondini ha scritto:
>> . e ..
>> mentre *.* no ... prende sono solo i file con
>> estensione non nascosti
> credo sia perche' su linux * include anche:
>
> No, su UNIX '*' non include i dot-file:
>
> neo:/tmp/test# ls -la
> total 120
> drwxr-xr-x 2 root root 4096 2007-06-08 12:41 .
> drwxrwxrwt 9 root root 114688 2007-06-08 12:41 ..
> -rw-r--r-- 1 root root 0 2007-06-08 12:41 a
> -rw-r--r-- 1 root root 0 2007-06-08 12:41 .a
> -rw-r--r-- 1 root root 0 2007-06-08 12:41 b
> -rw-r--r-- 1 root root 0 2007-06-08 12:41 .b
>
> neo:/tmp/test# echo *
> a b
>
> neo:/tmp/test# echo .*
> . .. .a .b
risolto così con Pclzip:
<?php
$wdir = $_SERVER['DOCUMENT_ROOT'];
require_once('pclzip.lib.php');
$archive = new PclZip('alecos.zip');
$v_list = $archive->add($wdir);
if ($v_list == 0) {
die("Error : ".$archive->errorInfo(true));
}
?>
--
Alessandro Marinuzzi
--------------------
http://www.alecos.it
--------------------
More information about the Php-it
mailing list