php Programming Glossary: extractto
Run composer with a PHP script in browser http://stackoverflow.com/questions/17219436/run-composer-with-a-php-script-in-browser setting phar.readonly must be set to 0 composerPhar extractTo EXTRACT_DIRECTORY This requires the phar to have been extracted..
Stop people uploading malicious PHP files via forms http://stackoverflow.com/questions/602539/stop-people-uploading-malicious-php-files-via-forms zip new ZipArchive x zip open file_to_open if x true zip extractTo target zip close unlink file_to_open else die There was a problem... ZipArchive. There have been traversal vulnerabilities in extractTo of the same sort that have affected most naive path based ZIP.. set' what do you mean by that I can't speak for ZipArchive.extractTo as I haven't tested it but many extractors when asked to dump..
Unzip a file with php http://stackoverflow.com/questions/8889025/unzip-a-file-with-php zip new ZipArchive res zip open 'file.zip' if res TRUE zip extractTo ' myzips extract_path ' zip close echo 'woot ' else echo 'doh.. if res TRUE extract it to the path we determined above zip extractTo path zip close echo WOOT file extracted to path else echo Doh..
PHP Untar-gz without exec()? http://stackoverflow.com/questions/9416508/php-untar-gz-without-exec The PharData class . To extract an archive using PharData extractTo which work like the ZipArchive extractTo try phar new PharData.. using PharData extractTo which work like the ZipArchive extractTo try phar new PharData 'myphar.tar' phar extractTo ' full path'.. extractTo try phar new PharData 'myphar.tar' phar extractTo ' full path' extract all files catch Exception e handle errors..
|