You are on page 1of 4

Pr

ogram 7:
Wri
teaPHPprogr
am t
odispl
ayadigi
tal
cl
ockwhichdi
spl
ayst
hecurr
entt
imeoftheser
ver.
pr
ogr
am7.
php
<!
DOCTYPEHTML>

<ht
ml>

<head>

<met
aht
tp-
equi
v="
ref
resh"
cont
ent
="1"
/>

<st
yle>

p{

col
or:
whi
te;

f
ont
-si
ze:
90px;

posi
ti
on:
absol
ute;

t
op:
50%;

l
eft
:50%;

t
ransf
orm:
tr
ansl
ate(
-50%,
-
50%)
;

body
{

backgr
ound-
col
or:
black;

</
sty
le>

<p><?
phpechodat
e("
h:i
:
sA"
);
?></
p>

</
head>

</
html
>
Out
put
:

pr
ogr
am7_a.
php
<!
DOCTYPEHTML>

<ht
ml>

<head>

<met
aht
tp-
equi
v="
ref
resh"cont
ent
="1"/
>

<st
yle>

p{

col
or:
black;
f
ont
-si
ze:
90px;

posi
ti
on:
absol
ute;

t
op:
50%;

l
eft
:50%;

t
ransf
orm:
transl
ate(
-50%,
-50%)
;

body{

backgr
ound-
col
or:
Dar
kbl
ue;

</
sty
le>

<p><?
phpechodat
e("h:
i:sA"
);
?>.
"<br
>";

echo"
Todayi
s".
dat
e("
y/m/
d")
."
<br
>";

echo"
Todayi
s".
dat
e("
y.m.
d")
."
<br
>";

echo"
Todayi
s".
dat
e("
y-m-
d")
."
<br
>";

echo"
Todayi
s".
dat
e("
l"
);

?
>

<p>

</
head>

</
html
>
Out
put
:

You might also like