Back to index

php5  5.3.10
include_path.phar.inc
Go to the documentation of this file.
00001 <?php
00002 // test advanced example
00003 $phar = new Phar(dirname(__FILE__) . '/include_path.phar');
00004 $phar2 = new Phar(dirname(__FILE__) . '/include_path2.phar');
00005 $phar2['file1.php'] = 'file1.php
00006 ';
00007 $phar2['test/file1.php'] = 'test/file1.php
00008 ';
00009 $phar['hello/test.php'] = '<?php
00010 include "file1.php";';
00011 
00012 $phar->setStub("<?php
00013 set_include_path('.' . PATH_SEPARATOR . 'phar://' . dirname(__FILE__) . '/files/include_path2.phar' );
00014 include 'phar://' . __FILE__ . '/hello/test.php';
00015 set_include_path('.' . PATH_SEPARATOR . 'phar://' . dirname(__FILE__) . '/files/include_path2.phar/test');
00016 include 'phar://' . __FILE__ . '/hello/test.php';
00017 echo \"ok\\n\";
00018 __HALT_COMPILER();
00019 ?>");