WT 7 – PHP – DIGITAL CLOCK

  WT LAB
7. WRITE A PHP PROGRAM TO DISPLAY A DIGITAL CLOCK WHICH DISPLAYS THE CURRENT TIME OF THE SERVER.

 SOLUTION  1  &  SOLUTION  2 

1. If xampp is in the system, save the program in C:xampphtdocs (start apache in xampp control panel)

2. If no xampp in the system, save the program in C:Program FilesApache GroupApache2htdocs   & Open Google Chrome & type http://localhost/prog7.php

prog7.php

<head>
<meta http-equiv=”refresh” content=”1″/>
<style>
p {
color:yellow;
font-size:90px;
position:absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
}
body {
background-color:maroon;
}
</style>
<p> <?php echo date(” h: i : s A”);?> </p>
</head>

STEPS :( click on image to zoom )



OUTPUT :( click on image to zoom )

LEAVE A COMMENT