Back to index

php5  5.3.10
write18.phar.inc
Go to the documentation of this file.
00001 <?php
00002 
00003 $fname = dirname(__FILE__) . '/write18.phar';
00004 @unlink($fname);
00005 
00006 $phar = new Phar($fname);
00007 $phar->setStub('<?php
00008 $p = new Phar(__FILE__);
00009 echo decoct(fileperms("phar://" . __FILE__ . "/test.txt")),"\n";
00010 $p["test.txt"]->chmod(0444);
00011 echo decoct(fileperms("phar://" . __FILE__ . "/test.txt")),"\n";
00012 echo "ok\n";
00013 __HALT_COMPILER();
00014 ?>');
00015 $phar['test.txt'] = "<?php __HALT"."_COMPILER();";
00016 $phar["test.txt"]->chmod(0666);
00017 ?>