源代码
/*
站内全文搜索引擎
作者:yannan
*/
function tree($directory)
{
global $string;
$mydir=dir($directory);
while($file=$mydir->read())
{
if((is_dir("$directory/$file")) AND ($file!=".") AND ($file!=".."))
{
tree("$directory/$file");
}
else
{
//检查文件类型,只搜索.php/html/htm文件
if((strstr($file,".php")==".php")||(strstr($file,".html")==".html")||(strstr($file,".htm")==".htm"))
{
//打开文件
if(!($myfile=fopen($directory."/".$file,"r")))
{
print("file could not be opened");
exit;
}
//搜索文件内容
while(!feof($myfile))
{
//read a line from the file
$myline=fgets($myfile,500);
if(ereg($string,$myline))
{
//输出结果
$path=substr($directory,2);
print("found $string");
print("in print($path."/".$file);
print("\">");
print($directory."/".$file);
print("
\n");
print(strip_tags($myline));
print("
\n");
}
} //endwhile of out put the file
fclose($myfile);
} //endif
} //endelse
} //endwhile
$mydir->close();
} //endfunction
//start the program
print("
if((isset($string)) AND ($string!=""))
{
$root=".";
tree($root);
}
?>

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

记事本++7.3.1
好用且免费的代码编辑器

Dreamweaver CS6
视觉化网页开发工具

Atom编辑器mac版下载
最流行的的开源编辑器

SublimeText3汉化版
中文版,非常好用