我正在使用 ezcomponents 存档组件来提取上传到我网站的上传文件。提取部分非常简单,但我如何专门为那些被提取的文件分配正确的权限?
http://ezcomponents.org/docs/tutorials/Archive#usage
$extract_dir = 'some existing directory';
$archive = ezcArchive::open($file, ezcArchive::ZIP);
while( $archive->valid() )
{
if ( is_dir($extract_dir) === false )
{
@mkdir($extract_dir, 0777);
}
// Extract the current archive entry to /data/<issue_id>/
$archive->extractCurrent($extract_dir);
$archive->next();
}
问候