2008-10-12 05:41:22 +00:00
|
|
|
<?php
|
|
|
|
// test advanced example
|
|
|
|
$phar = new Phar(dirname(__FILE__) . '/include_path.phar');
|
|
|
|
$phar2 = new Phar(dirname(__FILE__) . '/include_path2.phar');
|
|
|
|
$phar2['file1.php'] = 'file1.php
|
|
|
|
';
|
|
|
|
$phar2['test/file1.php'] = 'test/file1.php
|
|
|
|
';
|
|
|
|
$phar['hello/test.php'] = '<?php
|
|
|
|
include "file1.php";';
|
|
|
|
|
|
|
|
$phar->setStub("<?php
|
2008-10-12 06:40:36 +00:00
|
|
|
set_include_path('.' . PATH_SEPARATOR . 'phar://' . dirname(__FILE__) . '/files/include_path2.phar' );
|
2008-10-12 05:41:22 +00:00
|
|
|
include 'phar://' . __FILE__ . '/hello/test.php';
|
2008-10-12 06:40:36 +00:00
|
|
|
set_include_path('.' . PATH_SEPARATOR . 'phar://' . dirname(__FILE__) . '/files/include_path2.phar/test');
|
2008-10-12 05:41:22 +00:00
|
|
|
include 'phar://' . __FILE__ . '/hello/test.php';
|
|
|
|
echo \"ok\\n\";
|
|
|
|
__HALT_COMPILER();
|
|
|
|
?>");
|