1<?php 2 3$fname = dirname(__FILE__) . '/blog.phar'; 4@unlink($fname); 5 6$phar = new Phar($fname); 7$phar->setStub('<?php if(file_exists(dirname(__FILE__) . "/files/config.xml")) { 8 Phar::mount("config.xml", dirname(__FILE__) . "/files/config.xml"); 9} 10Phar::webPhar("blog", "index.php"); 11__HALT_COMPILER(); ?>'); 12$phar['index.php'] = '<?php if (!file_exists("config.xml")) { 13 include "install.php"; 14 exit; 15} 16var_dump(file_get_contents("config.xml")); 17?>'; 18$phar['install.php'] = '<?php echo "install\n"; ?>'; 19 20?> 21