php-xampp-visual-studio-code-debug ソースコード全文

index.php

index.php
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PHP デバッグテスト</title>
</head>
<body>
<h2>ボタンをクリックします。</h2>
<form method="POST" action="">
<input type="submit" value="クリック">
</form>
<?php
// フォームが送信された場合に処理を開始
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// デバッグ用:h2 タグ出力処理でブレイクポイントを設定し、処理を止める
echo "<h2 style='color:darkred'>ボタンがクリックされました!</h2>";
}
?>
</body>
</html>