Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
absoluteURI() URL: http://example.org/subdir/test.php/extra_pathinfo?abc=123
3
--GET--
4
--ENV--
5
HTTP_HOST=example.org
6
SERVER_NAME=example.org
7
QUERY_STRING=abc=123
8
SERVER_PORT=80
9
PATH_INFO=/extra_pathinfo
10
REQUEST_URI=/subdir/test.php/extra_pathinfo?abc=123
11
SCRIPT_NAME=/subdir/test.php
12
--FILE--
13
<?php
14
/**
15
 * This test checks that absoluteURI() still works with PATH_INFO without
16
 * trailing / and QUERY_STRING passed to the script.
17
 *
18
 * Relative URLs are resolved to the current script, stripping PATH_INFO
19
 *
20
 * PHP version 4 and 5
21
 *
22
 * @category HTTP
23
 * @package  HTTP
24
 * @author   Philippe Jausions <jausions@php.net>
25
 * @license  http://www.opensource.org/licenses/bsd-license.php New BSD License
26
 * @link     http://pear.php.net/package/HTTP
27
 */
28
require 'absoluteURI.inc';
29
 
30
?>
31
--EXPECT--
32
||                   => http://example.org/subdir/test.php/extra_pathinfo?abc=123
33
?new=value||         => http://example.org/subdir/test.php/extra_pathinfo?new=value
34
#anchor||            => http://example.org/subdir/test.php/extra_pathinfo?abc=123#anchor
35
/page.html||         => http://example.org/page.html
36
page.html||          => http://example.org/subdir/page.html
37
page.html|http|      => http://example.org/subdir/page.html
38
page.html|http|80    => http://example.org/subdir/page.html
39
page.html|http|8080  => http://example.org:8080/subdir/page.html
40
page.html|https|     => https://example.org/subdir/page.html
41
page.html|https|443  => https://example.org/subdir/page.html
42
page.html||8080      => http://example.org:8080/subdir/page.html
43
page.html|https|8888 => https://example.org:8888/subdir/page.html