This commit is contained in:
root
2025-04-24 10:12:10 +08:00
commit 57cae04c3a
889 changed files with 663318 additions and 0 deletions

42
ht/vip/itemquery.php Executable file
View File

@@ -0,0 +1,42 @@
<?php
error_reporting(0);
if($_POST){
$key=trim($_POST['keyword']);
$return=array(array('key'=>0,'val'=>'请选择'));
$file = fopen("item.txt", "r");
if($key==''){
while(!feof($file))
{
$line=fgets($file);
$txts=explode('|',$line);
if(count($txts)==2){
$tmp=array(
'key'=>$txts[0],
'val'=>$txts[1]
);
array_push($return,$tmp);
}
}
}else{
while(!feof($file))
{
$line=fgets($file);
$pos=strpos($line,$key);
if($pos){
$txts=explode('|',$line);
if(count($txts)==2){
$tmp=array(
'key'=>$txts[0],
'val'=>$txts[1]
);
array_push($return,$tmp);
}
}
}
}
fclose($file);
echo(json_encode($return));
}else{
$return=array(array('key'=>0,'val'=>'请选择'));
echo(json_encode($return));
}