php-windows Digest 13 Apr 2004 12:02:40 -0000 Issue 2207
Topics (messages 23427 through 23432):
Re: Date Math
23427 by: Charles P. Killmer
Re: How do I access the value of PHP_OS?
23428 by: simon.firepages.org
IIS problem while using PHP
23429 by: DUSTIN RICH
Re: PHP IIS 5 problem
23430 by: hubo
Re: Arrays
23431 by: Nadim Attari
RegEx help
23432 by: Ron.Herhuth.tatumpartners.com
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
The function I like using is strtotime. You should be able to do
something like
strtotime("now") - strtotime("2/7/2004")
Or I think there is a date difference function. Though that might be
strtotime("now - 2/7/2004")
Charles Killmer
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Monday, April 12, 2004 2:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Date Math
I am currently working on an application that needs to break out invoice
totals by age. This is a sample line item:
2/7/2004 ... $456.89
Current Total : Over 30 Days : Over 60 Days : Over 90 days
How can I determine the number of days from the current date? I should
be able to handle the rest.
Thanks in advance!
Ron
--- End Message ---
--- Begin Message ---
well someone is confused ;) , PHP_OS is a PHP constant , simply
<?echo PHP_OS;?>
Simon Wheeler
firepages
"Luis Moreira" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> David Scott wrote:
>
> > In the PHP on Windows chapter of Programming PHP, there is mention of
> > a constant, PHP_OS, that can be used to determine the OS running the
> > server that PHP is on.
> >
> > The example code is as follows,
> >
> > <?php
> > if (PHP_OS == "WIN32" || PHP_OS == "WINNT") {
> > define("INCLUDE_DIR","c:\\myapps");
> > } else {
> > // some other platform
> > define("INCLUDE_DIR", "/include");
> > }
> > ?>
> >
> > However, rather than checking this value, I'd like to see if flat out.
> > I tried this,
> >
> > <?php
> > echo "PHP_OS";
> > ?>
> >
> > But it didn't work. How can I see the value contained in this constant?
> >
> There is a lot of confusion on your head.
> That, and you didn't read the whole thing...
> The example MUST include the setting of a variable first, named PHP_OS
> (or better $PHP_OS), and then proceed to the part you show.
>
> If you write
> echo "PHP_OS";
> you are echoing a string, not the contents of a variable.
>
> If you do
> if (PHP_OS == "WIN32" || PHP_OS == "WINNT") {
> you are doing nothing, since PHP_OS is not a variable. It must be
> preceded by a dollar sign.
>
>
>
--- End Message ---
--- Begin Message ---
I have set up a site using PHP that works fine when using apache. Under IIS, I get to
the initial logon page, but after clicking anything I get the HTTP 405 - Resource not
allowed error. If I go to the site by typing the URL with the default file name
(index.php) attached to the end, then everything works fine. Is there some sort of
redirect problem. I've followed all the installation instructions and I have other
PHP sites on the same server that are configured the same way but run fine. I'm at a
loss???
Thanks for any help you can give!
--- End Message ---
--- Begin Message ---
Just put index.php into the list of "standard documents" beside default.htm,
default.asp and so on.
"DUSTIN RICH" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> I have set up a site using PHP that works fine when using apache. Under
> IIS, I get to the initial logon page, but after clicking anything I get
the
> HTTP 405 - Resource not allowed error. If I go to the site by typing the
> URL with the default file name (index.php) attached to the end, then
> everything works fine. Is there some sort of redirect problem. I've
> followed all the installation instructions and I have other PHP sites on
the
> same server that are configured the same way but run fine. I'm at a
loss???
> Thanks for any help you can give!
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
http://www.php.net/manual/en/ref.array.php
--- End Message ---
--- Begin Message ---
EEK! I have been trying to get it...I really have but I can't seem to put
together a seemingly simply RegEx to find a simple date string. I am
trying to contruct a RegEx that will find the following formats:
x/x/xxxx
xx/x/xxxx
x/xx/xxxx
xx/xx/xxxx
Any help is very much appreciated.
Thanks,
Ron
--- End Message ---