ZipArchive question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello;

Sorry in advance  if I am over working this list.....

I am attempting to get acquainted with the ZipArchive class

I have a page that self processes get and post vars.

In the following code an async get query is sent and processed successfully

(this is all local with no access from public network or cats walking on keyboards)

$_arch = new ZipArchive;
if($_GET['test'])
  {
   $_retStr = $_arch->open('test.zip', ZIPARCHIVE::CREATE);
   if($_retStr === TRUE || $_retStr == ZIPARCHIVE::ER_EXISTS)
      {
if($_arch->addFromString('test.txt', 'here is some nonsense for the sake of an argument.'))
         {
          $_arch->close();
          $_retStr = "good to go:\n".$_GET['test'];
         }
       else
         {
          $_arch->close();
          $_retStr = "no bueno:\n".$_GET['test'];
         }
      }
   else
      {
       $_retStr .= "Error Code: ".$_retVal."\n".$_GET['test'];
      }
   header('Content-Type: text/plain');
   print $_retStr;
   exit;
  }

My question is: Where is the test.zip archive file located? (/tmp, maybe?) I would expect it to be in the same dir as the processing script, but I don't see anything in the dir
by the name of test.zip.

I know this is not command line gzip but I seem to remember working with gzip or bzip on the
command line and seeing a visible archive file.

Thanks for time and attention
JK

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux