您好我正试图通过翻找文件中已找到的内容进行搜索
这里我的代码听起来很有效
<?php
$search = $_POST['search'];
$dir = '/lol/';
$files = scandir($dir,1);
foreach ($files as $lines){
foreach($lines as $line)
{
if(strpos($line, $search) !== false)
echo $line;
}
}
?>
</center>
</div>
</div>
<h3>Search by full email address or username. Example: user@test.com, usertest</h3>
<form action="a.php" method="post">
<input type="text" name="search" />
<input type="submit" value="Search" />
</form> <p>
</body>
</html>