title: php: can i zip glob files without full path?
body: <p>this code works like a magic batch of fresh potato chips on a really bad day: PURE JOY.  but when i extract the archive, the files are nested in the path they were stored in on the server.  me no likey.  how do i zip the glob without the full path; just the files.</p>
  
  <pre><code>$zip = new ZipArchive();
  $zip-&gt;open("_dox/pdftmp/".$_SESSION['archiveName'], ZipArchive::CREATE);
  $files_pdf = glob('_dox/pdftmp/*.pdf');
  foreach ($files_pdf as $file)
  {
    $zip-&gt;addFile($file);
  }
  $zip-&gt;close();
  </code></pre>
  
  <p>remember: just files, no extra folders.</p>
  
  <p>WR!</p>