Snippet details
ID: 516
Viewed: 2953
Added: 2003-11-03
Version: 1.0
Sorry no demo
This really simple bit of code will display a custom message if a variable is set to Off or display your HTML code if it's set to On.
General Details
Snippet uploaded by: Martyn Coupland
Email : webmaster@windowsforums.net
Snippet By: DA Master
<!---Head--->
<?php
/* status.php is simply a variable with On assigned as a default variable, you can change this to Off to make your site offline. Copy the code below and save it to status.php:
<?php
$status = "On"; // Change to Off to make site offline
?>
Before uploading this remove all the comments above */
include("/path/to/status.php"); // Include the file with the status
if($status == 'Off') // If the status is Off then show this
{
echo "Site is currently offline";
} else
{ ?>
<!---Body--->
<!-- HTML CODE HERE -->
<?php } ?>
No Reviews to show
