Browse Source

patch error

Baptiste Rebillard 1 year ago
parent
commit
4d6add6799
3 changed files with 14 additions and 8 deletions
  1. 10
    0
      error.php
  2. 3
    0
      errors/401.php
  3. 1
    8
      errors/404.php

+ 10
- 0
error.php View File

@@ -0,0 +1,10 @@
1
+<?php
2
+ob_start(); // Start reading html
3
+?>
4
+<main>
5
+    <img src="assets/img/error.JPG" style="margin-top: 50px;width:50vw;">
6
+</main>
7
+<?php
8
+$infopage = ["", "Erreur 404", ob_get_clean(), "", "erreur"]; //relativepath, pagetitle, pagecontent, pagescript, pagename | cf structure/template.php ligne 2 à 6
9
+include("structure/template.php");
10
+?>

+ 3
- 0
errors/401.php View File

@@ -0,0 +1,3 @@
1
+<?php
2
+header('Location: ../error.php');
3
+?>

+ 1
- 8
errors/404.php View File

@@ -1,10 +1,3 @@
1 1
 <?php
2
-ob_start(); // Start reading html
3
-?>
4
-<main>
5
-    <img src="assets/img/error.JPG" style="margin-top: 50px;width:50vw;">
6
-</main>
7
-<?php
8
-$infopage = ["", "Erreur 404", ob_get_clean(), "", "erreur"]; //relativepath, pagetitle, pagecontent, pagescript, pagename | cf structure/template.php ligne 2 à 6
9
-include("structure/template.php");
2
+header('Location: ../error.php');
10 3
 ?>

Loading…
Cancel
Save