Skip to content

Intiial PHP #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions html/index.html

This file was deleted.

27 changes: 27 additions & 0 deletions html/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nginx PHP Demo</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Welcome to Nginx PHP Demo!</h1>
<?php
$hour = date("H");
$greeting =
$hour < 12
? "Good morning"
: ($hour < 18
? "Good afternoon"
: "Good evening");
echo "<p>$greeting! The current time is " .
date("Y-m-d H:i:s") .
"</p>";
?>
<p>This is a simple demo page hosted on an Nginx server using PHP.</p>
</div>
</body>
</html>
18 changes: 18 additions & 0 deletions html/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}

.container {
width: 80%;
margin: auto;
overflow: hidden;
padding: 20px;
}

h1 {
color: #333;
}
File renamed without changes.