Nouvelle page et redirection.
This commit is contained in:
parent
f6a9c3617a
commit
2e9553be27
|
@ -64,9 +64,10 @@ class Page {
|
|||
header("Content-Type: " . $this->raw_mime);
|
||||
echo $this->raw_données;
|
||||
} else if ($this->type == "redirect") {
|
||||
echo "TODO : Redirection vers <a href=\""
|
||||
header("Location: " . $this->redirect_destination);
|
||||
/*echo "TODO : Redirection vers <a href=\""
|
||||
. $this->redirect_destination . "\">"
|
||||
. $this->redirect_destination . "</a>";
|
||||
. $this->redirect_destination . "</a>";*/
|
||||
}
|
||||
// TODO : else erreur
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
|
||||
class Système_fichiers {
|
||||
public static function créer_dossier($chemin_fs) {
|
||||
mkdir($chemin_fs);
|
||||
$d = dirname($chemin_fs);
|
||||
if (!is_dir($d)) self::créer_dossier($d);
|
||||
if (!is_dir($chemin_fs)) mkdir($chemin_fs);
|
||||
}
|
||||
|
||||
/*public static function créer_fichier($chemin_fs) {
|
||||
|
@ -30,7 +32,8 @@ class Système_fichiers {
|
|||
}
|
||||
|
||||
public static function écrire($chemin_fs, $données) {
|
||||
if (!is_dir(dirname($chemin_fs))) return false;
|
||||
$d = dirname($chemin_fs);
|
||||
if (!is_dir($d)) self::créer_dossier($d);
|
||||
return file_put_contents($chemin_fs, $données);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user