This is a discussion on Set Date? within the PHP Language forums, part of the PHP Programming Forums category; "Michael Willcocks" <michael@metrogroup.com.au> wrote in message news:3f7b745f$0$95042$c30e37c6@lon-reader....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
"Michael Willcocks" <michael@metrogroup.com.au> wrote in message
news:3f7b745f$0$95042$c30e37c6@lon-reader.news.telstra.net... > Can you tell PHP to set the date on your machine? > > Windows 2000 Pro > Apache 1.3 & PHP 4 > > Thx > > Can you use the system() or exec() function on your box? If so, you might be able to have it open a quick shell and set the time... |
|
|||
|
"Michael Willcocks" <michael@metrogroup.com.au> schrieb:
> <?php > $strDate = date("m-d-y"); > $strTime = date("G:i:s"); > > system ("date $strDate"); > system ("time $strTime"); > ?> > > that would do nothing, as it's justing setting to the date as it is anyway Yes, of course. Have a look at the optional second parameter of the date() function. Regards, Matthias |
|
|||
|
Worked it out...
This would work <?php $strDate = date("m-d-y"); $strTime = date("G:i:s"); system ("date $strDate"); system ("time $strTime"); ?> that would do nothing, as it's justing setting to the date as it is anyway thanks for your input MW "Randell D." <you.can.email.me.at.randelld@yahoo.com> wrote in message news:u6Leb.2764$pl3.958@pd7tw3no... > "Michael Willcocks" <michael@metrogroup.com.au> wrote in message > news:3f7b745f$0$95042$c30e37c6@lon-reader.news.telstra.net... > > Can you tell PHP to set the date on your machine? > > > > Windows 2000 Pro > > Apache 1.3 & PHP 4 > > > > Thx > > > > > > Can you use the system() or exec() function on your box? If so, you might > be able to have it open a quick shell and set the time... > > |