php-src/ext/phar/tests/frontcontroller6.phpt
Greg Beaver e67c584348 [DOC]
refactor the $rewrites parameter in Phar::webPhar.  Now it is a callback
that accepts the path requested.  This callback should return the actual filename
requested as a string, or false to deny access as HTTP 403.
Also fix incorrect munging of SCRIPT_NAME variable in mungServer
More importantly, Phar::webPhar now finds the filename hidden in:
http://localhost/myphar.phar/internal/file.php/extra/stuff
as 'internal/file.php' in phar 'myphar.phar' with REQUEST_URI '/internal/file.php/extra/stuff'
this will allow pharring up apps that use REQUEST_URI for front controller stuff.
2008-02-07 23:42:03 +00:00

21 lines
428 B
PHP

--TEST--
Phar front controller 404
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
SCRIPT_NAME=/frontcontroller6.php
REQUEST_URI=/frontcontroller6.php/notfound.php
PATH_INFO=/notfound.php
--FILE_EXTERNAL--
frontcontroller.phar
--EXPECTHEADERS--
Status: 404 Not Found
--EXPECT--
<html>
<head>
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
</body>
</html>