|
-
Dec 16th, 2002, 11:51 PM
#1
Thread Starter
Frenzied Member
get yesterday's date? / get weather the current site is http://... or https://...
OK first of all,
How can i get yesterday's date?
I mean in the format:
PHP Code:
date("d m, Y");
(Simply:
PHP Code:
$yesterday = date("d") - 1;
$yesterday .= " ".date("m, Y");
doesn't cut it (like i thought it mite [dummy me ]) as d - 1 = 0 if its the first etc.. and the month etc :@
Next:
Is there a HTTP_SERVER_VARS[?] or getenv("?") call to get weather the current site is http:// or https:// ?
tnx 
Oh also: mSQL (Microsoft SQL Server):
is there an equivilent to MySQL_Error() for it?
ta
-
Dec 17th, 2002, 10:02 AM
#2
Frenzied Member
1) $yesterday = strtotime("-1 day"), "\n";
$yesterday = " ".date("m, Y", $yesterday);
2) actually I just found out, by testing, that you can see if https is on by this $_SERVER['HTTPS'] will echo "on" or NULL if off. I am not sure if ftp is the same way.
3) msql_error
Last edited by phpman; Dec 17th, 2002 at 10:23 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|