0

Maintenance mode

<?php function maintenance($mode = FALSE){ if($mode){ header('Location: 196.200.44.171:8080/maintenance.php'); exit; } else{ header('Location: 196.200.44.171:8080/'); exit; } } ?> How can I add maintenance true show this page maintenance.php Like this include('maintenance.php')

20th Mar 2020, 8:50 AM
Abdifatah
Abdifatah - avatar
5 Antworten
+ 1
I didn't understand your question clearly. What is it exactly that you want to do? explain clearly please ...
20th Mar 2020, 9:15 AM
Ipang
+ 2
Did that someone give you a code example? I think you can ask for that if there is something unclear. If you mean to show *This page under construction* then I guess your code is already set correctly. Just redirect to a page showing that message (maintenance.php), otherwise, redirect to site base directory (usually means to load index.php). You don't need `include`, `require` or `require_once` anymore because the redirection had taken care of that, if I understood what you mean ...
20th Mar 2020, 9:44 AM
Ipang
+ 1
Then, if you wish to enter maintenance mode, just add the following line after the require_once line. maintenance(TRUE);
20th Mar 2020, 8:52 AM
Abdifatah
Abdifatah - avatar
+ 1
I mean someone told me to use if I want to go maintenance mode use this maintenance (true) before require_once ('maintenanc.php');
20th Mar 2020, 9:27 AM
Abdifatah
Abdifatah - avatar
+ 1
How I go about it
20th Mar 2020, 9:28 AM
Abdifatah
Abdifatah - avatar