ZipArchive::extractTo doesn't working on Windows Platform -


i'm using following code (windows hosting - plesk/win) :

<?php $zip = new ziparchive; $res = $zip->open('file.zip'); if ($res === true) { $path = getcwd();  $path = str_replace("/","\\",$path); echo $path; $zip->extractto('e:\\vhosts\\domain.com\\httpdocs\\test\\');    $zip->close();   echo 'ok!'; } else {   echo 'error!'; } ?> 

when run code, following message appears:

warning: ziparchive::extractto(e:\vhosts\domain.com\httpdocs\test/image1.jpg) [ziparchive.extractto]: failed open stream: permission denied in e:\vhosts\domain.com\httpdocs\test\extractphp.php on line 10

i don't why command put slash before unzipped file (test/image1.jpg).

how can resolve issue ?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -