php,html,png,jpeg皆さん、こんにちは。その他の形式で満たされた people という名前のディレクトリを読み込もうとしています。php必要なファイルとファイルをフィルタリングしてhtmlからエコーアウトしようとしています。
echoファイルがなかったため、機能しなかった私の試みは次のとおりです。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Khviii ICT</title>
</head>
<body>
<div align="center" ><h1>Welcome to KHVIII ICT</h1></div>
<?php
$dir="/people";
$allowed_view= array("php","html");
$files=scandir($dir);
foreach ($files as $file)
{
        $filexplosion=strtolower(end(explode('.',$file)));
    if (in_array($allowed_view,$filexplosion)) 
        {
    echo $file;
    } 
}
?>
</body>
</html>