php-src/ext/phar/tests/frontcontroller2.phpt
Greg Beaver 02c7ff1343 complete re-factoring of front controller. Now it is done with
Phar->webPhar():
<?php
Phar::webPhar();
__HALT_COMPILER();

With the above stub, the default front controller will kick in.  An array of mime type overrides, and another
array mapping phar file entry -> redirected entry can be used to further customize
[DOC]
2007-12-23 21:12:42 +00:00

33 lines
742 B
PHP

--TEST--
Phar front controller php
--SKIPIF--
<?php if (!extension_loaded("phar")) print "skip"; ?>
--INI--
phar.require_hash=0
phar.readonly=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
$pname = 'phar://' . $fname;
$a = new Phar($fname);
$a['a.php'] = 'hio';
$a->setStub('<?php
Phar::webPhar();
__HALT_COMPILER();');
$_SERVER['REQUEST_URI'] = '/' . basename(__FILE__, '.php') . '.phar.php/a.php';
include $fname;
?>
===DONE===
--CLEAN--
<?php
unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php');
unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php');
__HALT_COMPILER();
?>
--EXPECTHEADERS--
Content-type: text/html
--EXPECT--
hio