I am trying to create a Phar archive with one of my libs. Lib is just a bunch of classes organized into folders and subfolders. There is no index.php, just a static Config class to call the startup initiator.
In any case, I created this archive:
$phar = new Phar(__DIR__ . '/lis.phar',0,'lib.phar'); $phar->buildFromDirectory(__DIR__ . '/class','/\.php$'); $phar->stopBuffering();
After that, I try to use phar as follows:
require('lib.phar'); Config::register();
But I get the following error:
Warning: enable (phar: // D: \ wamp \ www_test \ phar \ lib.phar / index.php) [function.include]: could not open the stream: phar error: "index.php" is not a file in phar "D : /wamp/www/_test/phar/lib.phar "in D: \ wamp \ www_test \ phar \ lib.phar on line 9
How can I make a phar archive without any index.php file inside it? Actually, I just need an archive to be a container for my files, there is no need to automatically execute anything.
grunk source share