Created
June 6, 2017 21:14
-
-
Save olivertappin/01f3569c3bef6012aca3f8ab1a84130c to your computer and use it in GitHub Desktop.
Create a Phar file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$phar = new Phar('project.phar', 0, 'project.phar'); | |
$phar->buildFromDirectory(dirname(__FILE__) . '/phar'); | |
$phar->setStub($phar->createDefaultStub('index.php')); | |
// To generate the .phar file, run the following commands from the current directory: | |
// mkdir -p phar | |
// cp -R ./*.php phar/. | |
// cd phar && php ../build-phar.php | |
// cd ../ && mv phar/project.phar project.phar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment