// Tampilkan error untuk debugging (boleh dihapus nanti)
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Session start (PHP lama friendly)
session_start(array(
'cookie_lifetime' => 86400,
'cookie_httponly' => true
));
// Contoh variabel
$title = "Test PHP Berhasil";
$date = date("Y-m-d H:i:s");
<!DOCTYPE html>
<html lang="id">
<meta charset="UTF-8">
<?php echo $title; ?> <title> echo $title; </title>
<style>
body {
font-family: Arial, sans-serif;
background: #f4f6f8;
padding: 40px;
}
.box {
background: #ffffff;
padding: 25px;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
max-width: 600px;
margin: auto;
}
h1 {
margin-top: 0;
color: #333;
}
p {
color: #555;
}
</style>
<div class="box">
echo $title;
<p>Jika halaman ini tampil tanpa error, berarti:</p>
<ul>
<li>PHP kamu sudah berjalan dengan benar</li>
<li>Tidak ada syntax error</li>
<li>File berhasil diproses server</li>
</ul>
<p><strong>Waktu server:</strong> echo $date; </p>
</div>