TYPO3  7.6
6470.php
Go to the documentation of this file.
1 <?php
22  error_reporting(E_ALL | E_STRICT);
23 
24  require_once 'Net/URL2.php';
25 
26  $url = new Net_URL2('https://www.example.com/foo/bar/index.php?foo=bar');
27 
28 ?>
29 <html>
30 <body>
31 
32 <pre>
33 Protocol...: <?php echo $url->protocol; ?>
34 
35 Username...: <?php echo $url->user; ?>
36 
37 Password...: <?php echo $url->pass; ?>
38 
39 Server.....: <?php echo $url->host; ?>
40 
41 Port.......: <?php $url->port; ?>
42 
43 File/path..: <?php $url->path; ?>
44 
45 Querystring: <?php print_r($url->querystring); ?>
46 
47 Anchor.....: <?php echo $url->anchor;?>
48 
49 Full URL...: <?php echo $url->getUrl(); ?>
50 
51 Resolve path (/.././/foo/bar/joe/./././../jabba): <b><?php
52  echo $url->resolve('/.././/foo/bar/joe/./././../jabba'); ?></b>
53 </pre>
54 
55 </body>
56 </html>