diff --git a/functions/indexes.php b/functions/indexes.php
index 1da8e92..5bafa69 100644
--- a/functions/indexes.php
+++ b/functions/indexes.php
@@ -26,7 +26,8 @@ function tree($directory,$ignore) {
//echo $uri;
//exit;
$filepath = "$directory/$file";
- $url = $uri.'/'.$file;
+ $url = $uri.'/'.$directory.'/'.$file;
+ $url = str_replace("../","",$url);
echo "
$url\n";
}
diff --git a/functions/search.php b/functions/search.php
index f7e349c..6527826 100644
--- a/functions/search.php
+++ b/functions/search.php
@@ -4,15 +4,17 @@
$s = @$_GET['s'];
$s = trim($s);
$s = strip_tags($s);
+ $s = strtolower($s);
$text = strip_tags($html);
$arr = explode("\n",$text);
$txt = array();
foreach( $arr as $value )
{
- if((strpos($value,$s)) || (strpos($value,$s) === 0)){
+ if((stripos($value,$s)) || (stripos($value,$s) === 0)){
//echo $value.'--';
$value = trim($value);
+ //$value = strtolower($value);
//如果值带有.,说明是一个文件
if(strpos($value,'.')){
array_push($txt,$value);