Requête demandée : /examples/relative/foo/bar/?show=.%2Fqux%2Findex.php
Page PHP executée : /examples/relative/foo/bar/index.php
RELATIVE : ../../
WEB RELATIVE : ../../
Racine du site
Sans redirection (1 niveau)
Sans redirection (2 niveaux)
Sans redirection (3 niveaux)
Avec redirection (1 niveau)
Avec redirection (2 niveaux)
Avec redirection (3 niveaux)

Voir la source des fichiers :
./index.php
./404/index.php
./.htaccess
./qux/index.php
./qux/.htaccess
./css/relative.css
./foo/index.php
./foo/bar/index.php
./foo/bar/baz/index.php
./lib/init.php

./qux/index.php

<?php header('Content-Type: text/html; charset='.salt\CHARSET);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?= strtolower(salt\CHARSET?>" />
    <meta http-equiv="Content-Language" content="fr" />
    <meta name="author" content="RICHAUD Julien &quot;Fladnag&quot;" lang="fr" />
    <link href="<?= WEB_RELATIVE ?>css/relative.css" rel="stylesheet" type="text/css" media="all"/>
    <title>SALT - Exemple RELATIVE / WEB_RELATIVE</title>
</head>
<body>
<div>
Requête demandée : <?= $Input->S->HTML->REQUEST_URI ?><br/>
Page PHP executée : <?= $Input->S->HTML->SCRIPT_NAME ?><br/>
RELATIVE : <?= RELATIVE ?><br/>
WEB RELATIVE : <?= WEB_RELATIVE ?><br/>

<a href="<?= WEB_RELATIVE ?>./">Racine du site</a><br/>
<a href="<?= WEB_RELATIVE ?>foo/">Sans redirection (1 niveau)</a><br/>
<a href="<?= WEB_RELATIVE ?>foo/bar/">Sans redirection (2 niveaux)</a><br/>
<a href="<?= WEB_RELATIVE ?>foo/bar/baz/">Sans redirection (3 niveaux)</a><br/>
<a href="<?= WEB_RELATIVE ?>bar/">Avec redirection (1 niveau)</a><br/>
<a href="<?= WEB_RELATIVE ?>bar/qux/">Avec redirection (2 niveaux)</a><br/>
<a href="<?= WEB_RELATIVE ?>bar/qux/quux/">Avec redirection (3 niveaux)</a><br/>

<br/>
Voir la source des fichiers : <br/>
<?php
$directory 
= new \RecursiveDirectoryIterator(RELATIVE.'./', \FilesystemIterator::CURRENT_AS_FILEINFO);
$iterator = new \RecursiveIteratorIterator($directory);
$visibleFiles = array();
foreach(
$iterator as $k => $v) {
    if (!
$v->isDir()) {
        
$k substr($kstrlen(RELATIVE));
        
$visibleFiles[]=$k;
        echo 
'<a href="?show='.$Input->URL($k).'#show">'.$Input->HTML($k).'</a><br/>';
    }
}

if (
$Input->G->ISSET->show) {
    if (
in_array($Input->G->RAW->show$visibleFiles)) {
        echo 
'<h3 id="show">'.$Input->G->HTML->show.'</h3>';
        
highlight_file(RELATIVE.$Input->G->RAW->show);
    } else {
        echo 
'Accès interdit !';
    }
    echo 
'<br/>------ end of file ------<br/>';
}
?>
</div>
</body>
</html>

------ end of file ------