php-td03/pageCreator.php
2025-01-25 16:42:37 +01:00

18 lines
434 B
PHP

<?php
$title = $_GET["title"];
$author = $_GET["name"];
$pageContent = "<!DOCTYPE html>
<html lang='fr'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>$title - créée par $author</title>
</head>
<body>
Bienvenue sur votre page personnelle
</body>
</html>";
$page = fopen($author."html" , "w");
fwrite($page, $pageContent);
fclose($page);