Home > Backend Development > PHP Tutorial > Text-Based Search_PHP Tutorial

Text-Based Search_PHP Tutorial

WBOY
Release: 2016-07-21 16:05:49
Original
938 people have browsed it

In order to enhance the functionality on my website, I developed a text-based search based on the actual conditions of my website, which is now used on my website.In order to
learn from and communicate with the majority of netizens, I now publish the source code. The source code is as follows:
$dispstr=array();
$dispstr[1]="disp_os. php?article_id=";
$dispstr[2]="disp_webma.php?article_id=";
$dispstr[3]="disp_webcrea.php?article_id=";
$dispstr[4] ="disp_program.php?article_id=";
$dispstr[5]="disp_create.php?article_id=";
$file=file("news.txt");
$file1=file ("part.txt");
$file2=file("number.txt");
if(!isset($pagenum)){
$pagenum=1;
}
$lesssign=0;
$num=count($file);
$dispnumbeg=6*($pagenum-1);;
$artnumeof=6*$pagenum;
$isdispnum =$num-$artnumeof;
if($isdispnum<0){
$dispnumeof=$num;
$lesssign=1;
}
else{
$dispnumeof= $artnumeof;
}
$sign=0;
$pagec=0;
for($icount=0;($icount<$num)&&($sign==0);$ icount+=6){
for($i=0;$i<=6;$i++){
if(($icount*6+$i)==$num){
$sign =1;
                          9eae9 ;
$iscolor=0;
//$linkstr="disp_os.php?article_id=";
$lessnum=0;
for($i=$dispnumbeg;$i<$dispnumeof ;$i++){
$partnum=intval($file1[$i]);
if($partnum==0){
$dispvar=$fuhao.$file[$i];
echo "";
echo $dispvar;
echo"";
$lessnum++ ;
                                                                                                                                                              $link=$linkstr .$linknum;
$dispvar=$fuhao.$file[$i];
echo"";
echo"$dispvar";
   echo""; ;
               $iscolor=1;                                          
if($lesssign==1){
for($iless=$lessnum;$iless<=5;$iless++){
echo" ";
echo $fuhao."
n";
echo"";
if($iscolor==0){
$ color=ffffff; $iscolor=1;
}
else{
                                                                                                                            🎜> echo "";
?>




http://www.bkjia.com/PHPjc/315550.html

www.bkjia.com

true

TechArticleIn order to enhance the functionality on my website, I developed a text-based search based on the actual situation of my website , now used on my website. In order to learn from each other with the majority of netizens...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template