Results 1 to 2 of 2

Thread: get yesterday's date? / get weather the current site is http://... or https://...

  1. #1

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065

    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
    Wayne

  2. #2
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    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
  •  



Click Here to Expand Forum to Full Width