|
Posted by laredotornado@zipmail.com on 11/21/06 17:06
Hi,
I'm using PHP 4.4.4 with Apache 2 on Linux. I have a PHP function to
unzip a file, but I would like the resulting unzipped file with all its
sub-directories and files to have the same permissions as the parent
file, or at least 755 perms. Right now, it is being created with
rw-r--r-- perms. Here is my function
function unzipFile($p_zip_file_path, $p_zip_file_pwd,
$unzip_dir)
{
$cmd = "unzip ";
if (!empty($p_zip_file_pwd)) {
$cmd .= " -P $p_zip_file_pwd ";
} //
$cmd .= " -o -d $unzip_dir $p_zip_file_path 2>&1";
exec($cmd, $output, $return);
// failed if non-zero
if ($return != 0) {
$output = join("<BR>\n", $output) . "<BR>\n";
return $output;
} // if
return "";
}
Any suggestions on how to modify it? Thanks, - Dave
[Back to original message]
|