challenge.php
files-and-paths.md
PHP
Injection & input
Difficulty 2/3
1
<?php
2
// index.php — front controller for the public site
3
$page = $_GET[
'page'
] ??
'home'
;
4
5
// Pages live in pages/*.php, e.g. ?page=about loads pages/about.php
6
include
'pages/'
. $page .
'.php'
;