Hello PHP !
Question
Créer un fichier test.php utilisant la fonction phpinfo et le tester (la fonction renvoie les informations techniques sur le module PHP installé sur le serveur).
Créer un fichier hello.php et le tester en accédant à la page.
1
2
3
echo "Hello world !";
4
5
Question
Transformer le fichier PHP pour qu'il renvoie une page HTML.
Solution
1
<html xmlns="http://www.w3.org/1999/xhtml">
2
<head>3
<title>Hello PHP !</title>
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
</head>6
<body>7
<p>8
9
echo "Hello world !";
10
11
</p>12
</body>13
</html>