mirror of
https://github.com/php/php-src.git
synced 2024-10-03 07:46:12 +00:00
18 lines
427 B
PHP
18 lines
427 B
PHP
<?php
|
|
|
|
$fname = dirname(__FILE__) . '/write18.phar';
|
|
@unlink($fname);
|
|
|
|
$phar = new Phar($fname);
|
|
$phar->setStub('<?php
|
|
$p = new Phar(__FILE__);
|
|
echo decoct(fileperms("phar://" . __FILE__ . "/test.txt")),"\n";
|
|
$p["test.txt"]->chmod(0444);
|
|
echo decoct(fileperms("phar://" . __FILE__ . "/test.txt")),"\n";
|
|
echo "ok\n";
|
|
__HALT_COMPILER();
|
|
?>');
|
|
$phar['test.txt'] = "<?php __HALT"."_COMPILER();";
|
|
$phar["test.txt"]->chmod(0666);
|
|
?>
|