Archived Forum Post

Index of archived forum posts

Question:

PHP Extension on widnows Saved File To Different Location.

Feb 22 '14 at 09:29

Greetings, i am working on a local server (wamp/easyphp). I am trying to use activex as php extension.

so, for testing i use following code:

$objZip = new COM("Chilkat.Zip2");

$success = $objZip->UnlockComponent('Unlock code goes here');
if ($success != true)
{
    exit('Zip reg error!');
}

$success = $objZip->NewZip("./1.zip");

if ($success != true)
{
    exit('New Zip error!');
}

$success = $objZip->AppendString('Sample.txt', 'i love to test');
if ($success != true)
{
    exit('Add error!');
}

$success = $objZip->WriteZipAndClose();
if ($success != true)
{
    exit('Zip Write error!');
}

$objZip = null;
unset($objZip);

but instead of saving files to current directory (where the php file is) it savings file to following directory:

c:\Program Files\EasyPHP-12.1\apache\

And i don't know how to get that file from that directory to current directory.

So, any help would be highly appreciated :)

....best regards