Jump to content

Recommended Posts

Hello everyone,

 

i just want to know what language should i use to enable or disable my website, this is a new task for me but im unsure what language it would be coded in to do it, if anyone has used vbulletin you'll know what i mean by turning it on and off.

 

 

Rick

There's a million ways to implement something like that, depending on what your "website" is.  But it basically boils down to a simple condition:

 

$sitestatus = 0; // random variable name. 1 = 1, 0 = off

if($sitestatus == 0) { 
  // echo site is 'turned off' message
} else {
   // display page or do whatever 
}

 

You would have a hardcoded variable or a value in a column in a database or something in a flatfile or whatever.  1 = on, 0 = off.  Then it's a simple matter of checking whether the variable is 1 or 0.  You can do that in any language meant for "websites".

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.