70 lines
2.7 KiB
PHP
70 lines
2.7 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
@ini_set('display_errors', '1');
|
|
@error_reporting(E_ALL);
|
|
@date_default_timezone_set('UTC');
|
|
|
|
$phpVersion = PHP_VERSION;
|
|
$server = $_SERVER['SERVER_SOFTWARE'] ?? 'Apache';
|
|
$root = realpath(__DIR__) ?: __DIR__;
|
|
$now = date('Y-m-d H:i:s');
|
|
?>
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>LAMP Workspace</title>
|
|
<style>
|
|
:root { color-scheme: light dark; }
|
|
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; }
|
|
header { background:#111; color:#fff; padding:16px 24px; }
|
|
main { max-width: 880px; margin: 32px auto; padding: 0 16px; }
|
|
h1 { margin: 0 0 8px; font-size: 22px; }
|
|
h2 { margin-top: 28px; font-size: 18px; }
|
|
p { margin: 8px 0; }
|
|
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
|
|
pre { background: #0b1020; color: #cfe7ff; padding: 12px; border-radius: 8px; overflow:auto; }
|
|
.grid { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
|
|
.card { border:1px solid #ddd; border-radius:8px; padding:12px; }
|
|
.muted { color:#666; }
|
|
.kv { display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px dashed #e3e3e3; }
|
|
.kv:last-child { border-bottom:0; }
|
|
footer { color:#777; margin: 28px 0 40px; text-align:center; font-size: 13px; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>LAMP stack is ready</h1>
|
|
</header>
|
|
|
|
<main>
|
|
<section class="grid">
|
|
<div class="card">
|
|
<h2>Stack</h2>
|
|
<div class="kv"><span>Web server</span><code><?= htmlspecialchars($server) ?></code></div>
|
|
<div class="kv"><span>PHP</span><code><?= htmlspecialchars($phpVersion) ?></code></div>
|
|
</div>
|
|
<div class="card">
|
|
<h2>Tips</h2>
|
|
<p>• Put your app files into this folder.</p>
|
|
<p>• <code>.htaccess</code> is enabled; <code>index.php</code> has priority.</p>
|
|
<p>• Errors are shown for development (disable in production).</p>
|
|
</div>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Try ideas</h2>
|
|
<p class="muted">You can ask the assistant to generate or modify code. Example requests:</p>
|
|
<pre><code>"Create a simple landing page with a hero section and a contact form."
|
|
"Build an engineering calculator (e.g., beam deflection or resistor color code)."
|
|
"Refactor the current PHP file for better readability and error handling."
|
|
"Scan the project and list potential security issues in configuration."
|
|
"Add basic routing and a simple controller to serve multiple pages."</code></pre>
|
|
</section>
|
|
|
|
<footer>Updated at <?= htmlspecialchars($now) ?> (UTC)</footer>
|
|
</main>
|
|
</body>
|
|
</html>
|