

ID: 516
Viewed: 5779
Added: Nov 03, 2003
Version: 1.0



Snippet uploaded by: Martyn Coupland
Written By: DA Master
Demo: Sorry, no demo



Thank you for your vote. Please wait...
It appears you already voted for this snippet
It appears your vote value was empty


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.
<!---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 Comments to show


Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.
Adding your comment. Please wait...
Thanks for adding your comment!. After further review it will be added.
There was a problem adding your comment. Please try again.
Please complete all the fields in the form before sending.