Back to index

php5  5.3.10
gtPackage.php
Go to the documentation of this file.
00001 <?php
00002 
00008 if (Phar::canWrite()) {
00009   echo "Writing phar archive\n";
00010 } else {
00011   echo "Unable to write archive, check that phar.readonly is 0 in your php.ini\n";
00012   exit();
00013 }
00014 $thisDir = dirname(__FILE__);
00015 $pharPath = substr($thisDir, 0, -strlen('/generate-phpt'));
00016 
00017 $phar = new Phar($pharPath.'/generate-phpt.phar');
00018 
00019 $phar->buildFromDirectory($thisDir.'/src');
00020 
00021 $stub = <<<ENDSTUB
00022 <?php
00023 Phar::mapPhar('generate-phpt.phar');
00024 require 'phar://generate-phpt.phar/generate-phpt.php';
00025 __HALT_COMPILER();
00026 ENDSTUB;
00027 
00028 $phar->setStub($stub);
00029 
00030 ?>