4
Contributors
6
Replies
45
Views
4 Years
Discussion Span
Last Post by TonyG_cyprus
0

you'll need to call an external program that can do that. Which would of course have to be operating system dependent.

And no, you're (on any server worth the effort invested in its security) won't have permission to execute that created executable file on the server.

0

Creating zip files in php is easy. Creating a self-extractor, well that's something else. I don't think php can do this. You may be able to write a self-extractor program, but rather you than me :)

0

Hello guys, thanks for your responses, this is what I've got so far "<?php system('unzip filename.zip'); ?>" upon accessing this code, it will extract filename.zip to the server it resides in. Rather than self extract, I need to look for another way to make it act like a self extraction or what ever way round.

The the dilema is I'm trying to extract from and into a remote server, I know this is somehow possible, but I don't know how. Thanks in advance and I'm really grateful for every help possible.

0

You can, perhaps write a function to display/run files after extraction using something like
an include or similar, but you will need to check permissions on the server. It's one thing to get it working on your dev machine where you have all permissions but as pointed out by jwenting, another thing entirely on a server where you don't.

Edited by TonyG_cyprus

0

TonyG, that sounds great, I will be most grateful if you can share a typical code that does that. Thanks in advance.

0

Never done it before, but the easiest way I found with a bit of 'googling' was to open the extracted archive in an iframe.

<iframe width=100% height=100% src='unzipped/filename/index.php'> </iframe>

Worked for me.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.