Back to index

php5  5.3.10
write3.phar.inc
Go to the documentation of this file.
00001 <?php
00002 
00003 $fname = dirname(__FILE__) . '/write3.phar';
00004 @unlink($fname);
00005 
00006 $phar = new Phar($fname);
00007 $phar->setStub('<?php
00008 clearstatcache();
00009 var_dump(file_exists("phar://" . __FILE__ . "/test"), is_dir("phar://" . __FILE__ . "/test"));
00010 rmdir("phar://" . __FILE__ . "/test");
00011 clearstatcache();
00012 var_dump(file_exists("phar://" . __FILE__ . "/test"), is_dir("phar://" . __FILE__ . "/test"));
00013 echo "ok\n";
00014 __HALT_COMPILER();
00015 ?>');
00016 $phar->setMetadata('hi');
00017 $phar['test.txt'] = "hi
00018 ";
00019 $phar['test.txt']->setMetadata('hi');
00020 $phar->addEmptyDir('test');
00021 ?>