Modification sur la pseudo-réécriture d'URL.
This commit is contained in:
parent
10eef9a593
commit
59cd53a52c
|
@ -4,7 +4,7 @@ require_once(dirname(__FILE__) . "/config.php");
|
|||
require_once(dirname(__FILE__) . "/include.php");
|
||||
|
||||
class CMS {
|
||||
public function cms($chemin_str) {
|
||||
public static function page($chemin_str) {
|
||||
// TODO : appeller Modules::action($chemin, $action, $paramètres);
|
||||
|
||||
$chemin = new Chemin($chemin_str);
|
||||
|
|
|
@ -20,10 +20,11 @@ class Stockage {
|
|||
// Imitation de l'url rewriting lorsque ce n'est pas disponible sur
|
||||
// le serveur.
|
||||
public function activer_réécriture($chemin_vers) {
|
||||
$php_str = "<?php\n=";
|
||||
$php_str .= "require_once(" . Path::combine($config_chemin_base, "cms.php") . ");\n";
|
||||
$php_str .= "CMS::cms(" . $chemin_vers->get() . ");\n";
|
||||
$php_str .= "?>\n";
|
||||
// TODO : échapper les " dans le require_once et l'appel à cms.
|
||||
$php_str = "<?php\n\n";
|
||||
$php_str .= "require_once(\"" . Path::combine($config_chemin_base, "cms.php") . "\");\n\n";
|
||||
$php_str .= "CMS::page(\"" . $chemin_vers->get() . "\");\n\n";
|
||||
$php_str .= "?>";
|
||||
return SystemeFichiers::écrire($chemin_vers->get_fs_public(), $php_str);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user