[PHP] Re: unzip a file - destination folder wrong

2009-04-23 Thread Shawn McKenzie
Merlin Morgenstern wrote: Hi there, I am trying to unzip a zip file. Therefore I am using this function: # unzip a file function extract_zipfile($filename){ $zip = zip_open($filename); if ($zip) { while ($zip_entry = zip_read($zip)) { $fp =

[PHP] Re: unzip a file - destination folder wrong

2009-04-23 Thread Merlin Morgenstern
Shawn McKenzie wrote: Merlin Morgenstern wrote: Hi there, I am trying to unzip a zip file. Therefore I am using this function: # unzip a file function extract_zipfile($filename){ $zip = zip_open($filename); if ($zip) { while ($zip_entry = zip_read($zip)) { $fp =

[PHP] Re: unzip a file - destination folder wrong

2009-04-23 Thread Shawn McKenzie
Merlin Morgenstern wrote: Shawn McKenzie wrote: Merlin Morgenstern wrote: Hi there, I am trying to unzip a zip file. Therefore I am using this function: # unzip a file function extract_zipfile($filename){ $zip = zip_open($filename); if ($zip) { while ($zip_entry =

Re: [PHP] Re: unzip a file - destination folder wrong

2009-04-23 Thread 9el
snip $fp = fopen(dirname($filename) . '/' . zip_entry_name($zip_entry), w); thank you this worked. How come the . '/' . zip_entry_name($zip_entry) is needed? Looks like a double file name, but the result is ok. Could you explain this line? /snip read carefully, you'll understand too. :)