Bahi mujeh php ka date and time ka code cahiye ... jo roz khud he automatically change ho ya jo time and date pc mein ho osse ko show karai .
Bahi mujeh php ka date and time ka code cahiye ... jo roz khud he automatically change ho ya jo time and date pc mein ho osse ko show karai .
I guess this one will work..
Quick one-liner to output the current server date and time on a page.
The code
<?php
/**
* Just add this in your page where you
* want the date/time to appear
*
* For more configuration options look
* in the PHP manual at http://uk2.php.net/date
*/
// Displays in the format Saturday, November 22, 2003 11.38
echo date("l, F d, Y h:i" ,time());
?>
Not Working
ye mujeh ata tha bhol gaya ha mujeh se bht chota sa function tha aik line se bhi kam bht chota sa but bhol gaya ha
PHP server side scripting language he, chunke iska code server per parse hota he is lye he time bhi server computer ka show karega, for example agar aap ka server USA mein he to wo php ka date&time function visitor ko USA ka data & time show karega.
lekin aap ko wo time show karna he joke ke visitor ke computer mein ho to iske lye aap kisi client side scripting language ka code use karain jasay java script.Code:<?php $dateFormat="d-m-Y h:i A"; $TimeDate=date($dateFormat, time()); echo $TimeDate; ?>
time server ka show kre ga......client k pass jo tym hoga wo show nhi hoga...
<?php
print date('D, d M Y H:i:s:a');
?>
Bookmarks