Back to index

php5  5.3.10
write24.phar.inc
Go to the documentation of this file.
00001 <?php
00002 
00003 $fname = dirname(__FILE__) . '/write24.phar';
00004 @unlink($fname);
00005 
00006 $phar = new Phar($fname);
00007 $phar->setStub('<?php
00008 $p = new Phar(__FILE__);
00009 var_dump(isset($p["newname"]));
00010 $fp = fopen("phar://" . __FILE__ . "/newname", "w");
00011 fwrite($fp, b"hi");
00012 fclose($fp);
00013 var_dump(isset($p["newname"]));
00014 echo "ok\n";
00015 __HALT_COMPILER();
00016 ?>');
00017 $phar['test.txt'] = "<?php __HALT"."_COMPILER();";
00018 ?>