7. VTU WEB TECHNOLOGY LAB | READ NOW
VTU WEB TECHNOLOGY LAB
7] WRITE A PHP PROGRAM TO DISPLAY A DIGITAL CLOCK THAT DISPLAYS THE CURRENT TIME OF THE SERVER.
STEPS TO EXECUTE PHP PROGRAM
- Copy the php code given below
- Save it with .php file name extension
- Place the file in the htdocs of XAAMP
- Start the XAAMP control panel
- Start Apache server
- Click on admin in XAMPP Control pale
- Replace the url dashboard name with your php file name
- Execution completed
Solution 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>
<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>
<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>
WEB TECHNOLOGY Output
