현재 사용자가있는 현재 페이지를 표시하려고하고 있으며 사용자가 다른 페이지로 이동할 때마다 업데이트됩니다. 지금까지 내 코드가있다.PHP 현재 페이지 표시
$files = [
'<a href="session.php">'. 'Home' .'</a>' ,
'<a href="sql1.php">'. 'SQL1' .'</a>' ,
'<a href="sql2.php">'. 'SQL2' .'</a>',
'<a href="sql3.php">'. 'SQL3' .'</a>',
'<a href="sql4.php">'. 'SQL4' .'</a>',
'<a href="sql5_1.php">'. 'SQL5_1' .'</a>',
'<a href="sql5_2.php">'. 'SQL5_2' .'</a>',
'<a href="sql6.php">'. 'SQL6' .'</a>',
'<a href="sql7.php">'. 'SQL7' .'</a>',
'<a href="sql8.php">'. 'SQL8' .'</a>',
'<a href="sql9.php">'. 'SQL9' .'</a>',
'<a href="sql10.php">'. 'SQL10' .'</a>',
];
file_get_contents('sql1.php');
file_get_contents('sql2.php');
file_get_contents('sql3.php');
file_get_contents('sql4.php');
file_get_contents('sql5_1.php');
file_get_contents('sql5_2.php');
file_get_contents('sql6.php');
file_get_contents('sql7.php');
file_get_contents('sql8.php');
file_get_contents('sql9.php');
file_get_contents('sql10.php');
echo "Next Page ".$files[array_rand($files)];
귀하의 질문은 무엇입니까? –
마법 상수 '__FILE__'을 사용하는 방법은 파일 경로가 아닌 파일 만 표시한다는 것을 보여 줍니까? –