if (strftime("%H") == "03")
        header( "Location: maintainence.php" );

Note the exit; line.


-----Original Message-----
From: J. Michael Roberts [mailto:[EMAIL PROTECTED] 
Sent: July 24, 2003 10:09 AM
Subject: [PHP-DB] Line of code should work...but doesn't

I've been going a little crazy here with a single line of code that 
should work, but doesn't. It's probably has something to do with the 
fact that I've been staring at pages of code for months on end.

In order to make user that nobody is screwing with the database while 
the daily backups and maintainence are running, I decided to make a 
little thing that would keep people from logging in, etc. Here's the

if (strftime("%H") == "03") { header( "Location: maintainence.php" ); }

In theory, if it's any time between 03:00:00 and 03:59:59 the user 
should be redirected to the page maintainence.php, but when testing it 
passes over this line without a blip. Any ideas?

Feeling fried,

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to