Answer the question
In order to leave comments, you need to log in
How to change permissions from 777 to 755 when unpacking an archive?
Faced a problem.
When unpacking an archive using php unzip, the permissions are set to 777 for folders and 666 for files.
How to put instead of them 755 for folders and 644 for files when unpacking?
And here is the unzip php code.
<?php
$zip = new ZipArchive;
if ($zip->open('zip.zip') === TRUE) {
// путь к каталогу, в который будут помещены файлы
$zip->extractTo('.test/');
$zip->close();
// удача
} else {
// неудача
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question