Skip to content

Instantly share code, notes, and snippets.

@librasteve
Created September 15, 2024 18:14
Show Gist options
  • Save librasteve/009831b5cb6821fa6daabb1de19aa4e6 to your computer and use it in GitHub Desktop.
Save librasteve/009831b5cb6821fa6daabb1de19aa4e6 to your computer and use it in GitHub Desktop.
Simple PHP HTML Page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple PHP Page</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
padding: 20px;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
color: #333;
}
p {
font-size: 16px;
}
</style>
</head>
<body>
<div class="container">
<h1>Welcome to My Simple PHP Page!</h1>
<p>
Today is:
<?php
// Get the current date and time
echo date("l, F j, Y, g:i a");
?>
</p>
<p>
Random number:
<?php
// Generate a random number between 1 and 100
echo rand(1, 100);
?>
</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment