Make your own on-site search engine_PHP tutorial

WBOY
Release: 2016-07-21 16:09:16
Original
902 people have browsed it

ccterran(原作)

作者:iwind

  朋友用dreamweaver做了一个网站,没有动态的内容,只是一些个人收藏的文章,个人介绍等等。现在内容比较多了,想叫我帮他做一个搜索引擎。说实在的,这是一个不难的问题,于是就随手做了一个。现在我在其它论坛上也看到有人想做这个,于是就想说说这方面的知识,重在了解一下方法。

写程序前先要想好一个思路,下面是我的思路,可能谁有更好的,但注意这只是一个方法问题 :遍历所有文件  读取内容  搜索关键字,如果匹配就放入一个数组  读数组。在实现这些步骤之前,我假定你的网页都是标准的,就是有标题(),也有(),如果你是用dreamweaver或者frontpage设计的,那么除非你故意删掉,它们都在存在的。下面就让我们一步步来完成并在工程中改善这个搜索引擎。

一,设计搜索表单
在网站的根目录下建个search.htm,内容如下


搜索表单



 
   
     
     
   
 

       

         
       

     

       
     




二,搜索程序
再在根目录下建个search.php 的文件,用来处理search.htm表单传过来的数据.内容如下
//获取搜索关键字
$keyword=trim($_POST[“keyword”]);
//检查是否为空
if($keyword==””){
echo”您要搜索的关键字不能为空”;
exit;//结束程序
}
?>

这样如果访问者输入的关键字为空时,可以做出提示。下面是遍历所有文件。

我们可以用递归的方法遍历所有的文件,可以用函数opendir,readdir,也可以用PHP Directory的类。我们现在用前者.
//遍历所有文件的函数
function listFiles($dir){
$handle=opendir($dir);
while(false!==($file=readdir($handle))){
if($file!="."&&$file!=".."){
//如果是目录就继续搜索
if(is_dir("$dir/$file")){
listFiles("$dir/$file");
}
else{
//在这里进行处理
}
}
}
}

?>

在红字的地方我们可以对搜索到的文件进行读取,处理.下面就是读取文件内容,并检查内容中是否含有关键字$keyword,如果含有就把文件地址赋给一个数组。
//$dir是搜索的目录,$keyword是搜索的关键字 ,$array是存放的数组
function listFiles($dir,$keyword,&$array){
$handle=opendir($dir);
while(false!==($file=readdir($handle))){
if($file!="."&&$file!=".."){
if(is_dir("$dir/$file")){
listFiles("$dir/$file",$keyword,$array);
}
else{
//读取文件内容
$data=fread(fopen("$dir/$file","r"),filesize("$dir/$file"));
//不搜索自身
if($file!=”search.php”){
//是否匹配
if(eregi("$keyword",$data)){
$array[]="$dir/$file";
}
}
}
}
}
}
//定义数组$array
$array=array();
//执行函数
listFiles(".","php",$array);
//打印搜索结果
foreach($array as $value){
echo "$value"."
\n";
}
?>

现在把这个结果和开头的一段程序结合起来,输入一个关键字,然后就会发现你的网站中的相关结果都被搜索出来了。我们现在在把它完善一下。
1,列出内容的标题

                          if(eregi("$keyword",$data)){
                  $array[]="$dir/$file";
                          }
改成
                          if(eregi("$keyword",$data)){
                                   if(eregi("(.+)",$data,$m)){
                        $title=$m["1"];
                                   }
                                   else{
                        $title="没有标题";
                                   }
                                   $array[]="$dir/$file $title";
                           }
原理就是,如果在文件内容中找到xxx,那么就把xxx取出来作为标题,如果找不到那么就把标题命名未”没有标题”.

2,只搜索网页的内容的主题部分。
做网页时一定会有很多html代码在里面,而这些都不是我们想要搜索的,所以要去除它们。我现在用正则表达式和strip_tags的配合,并不能把所有的都去掉。

            $data=fread(fopen("$dir/$file","r"),filesize("$dir/$file"));
            //不搜索自身
            if($file!=”search.php”){
              //是否匹配
                          if(eregi("$keyword",$data)){
改为
$data=fread(fopen("$dir/$file","r"),filesize("$dir/$file"));
           if(eregi("]+)>(.+)",$data,$b)){
                 $body=strip_tags($b["2"]);
                        }
                        else{
                 $body=strip_tags($data);
                        }
                        if($file!="search.php"){
                            if(eregi("$keyword",$body)){

3,标题上加链接
foreach($array as $value){
   echo "$value"."
\n";
}
改成
foreach($array as $value){
   //拆开
   list($filedir,$title)=split(“[ ]”,$value,”2”);
   //输出
   echo "$value"."
\n";
}
4防止超时
如果文件比较多,那么防止PHP执行时间超时是必要的。可以在文件头加上
set_time_limit(“600”);
以秒为单位,所以上面是设10分钟为限。


So the complete program is
set_time_limit("600");
//Get the search keyword
$keyword=trim($_POST["keyword "]);
//Check if it is empty
if($keyword==""){
echo "The keyword you want to search cannot be empty";
exit;//End Program
}
function listFiles($dir,$keyword,&$array){
$handle=opendir($dir);
while(false!==($file=readdir($ handle))){
If($file!="."&&$file!=".."){
if(is_dir("$dir/$file")){
listFiles( "$dir/$file",$keyword,$array);
                                                                                                                                                           . $dir/$file"));
If(eregi("]+)>(.+)",$data,$b)){
                $body=strip_tags($b["2"]);                                                   $body=strip_tags($data);
                                                                                    "search.php"){
if(eregi("$keyword",$body)){
if(eregi("(.+)</title&g t;",$data, $m)){<BR>                                                                                           else{<BR> $title="No title";<BR> }<BR> $array[] ="$dir/$file $title";<BR>                                                                                                        🎜>}<BR>$array=array();<BR>listFiles( ".","$keyword",$array);<BR>foreach($array as $value){<BR> //Split<BR> list($filedir,$title)=split("[ ]" ,$value,"2");<BR> //Output<BR> echo "<a href=$filedir target=_blank>$title </a>"."<br>n";<br>}<br>?><br><br>So far, you have built your own search engine. You can also improve it by modifying the content processing part. You can search for titles or search for content. Function. Also consider pagination. Keep this to yourself. <br><br>Here is a description of using preg_match instead of eregi, which will be much faster. This is just for easy understanding, so the commonly used eregi is used. <br><br> <br> <br></p> <p align="left"></p> <div style="display:none;"> <span id="url" itemprop="url">http://www.bkjia.com/PHPjc/314558.html</span><span id="indexUrl" itemprop="indexUrl">www.bkjia.com</span><span id="isOriginal" itemprop="isOriginal">true</span><span id="isBasedOnUrl" itemprop="isBasedOnUrl">http: //www.bkjia.com/PHPjc/314558.html</span><span id="genre" itemprop="genre">TechArticle</span><span id="description" itemprop="description">ccterran (original work) Author: iwind A friend made a website using Dreamweaver. There is no dynamic content, just some personal collections. articles, personal introductions, etc. There is more content now...</span> </div> <div class="art_confoot"></div> </div> </div> <div style="height: 25px;"> <div class="wzconBq" style="display: inline-flex;"> <span>Related labels:</span> <div class="wzcbqd"> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=dreamweaver" target="_blank">dreamweaver</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=author" target="_blank">author</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=searchengine" target="_blank">search engine</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=friend" target="_blank">friend</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=use" target="_blank">use</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=website" target="_blank">website</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=own" target="_blank">Own</a> </div> </div> <div style="display: inline-flex;float: right; color:#333333;">source:php.cn</div> </div> <div class="wzconOtherwz"> <a href="http://www.php.cn/faq/312307.html" title="Generation of Pinyin Code Table_PHP Tutorial"> <span>Previous article:Generation of Pinyin Code Table_PHP Tutorial</span> </a> <a href="http://www.php.cn/faq/312309.html" title="What is the life cycle of session_PHP Tutorial"> <span>Next article:What is the life cycle of session_PHP Tutorial</span> </a> </div> <div class="wzconShengming"> <div class="bzsmdiv">Statement of this Website</div> <div>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</div> </div> <div class="wwads-cn wwads-horizontal" data-id="156" style="max-width:955px"></div> <div class="wzconZzwz"> <div class="wzconZzwztitle">Latest Articles by Author</div> <ul> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612210.html">BlackRock Labels BTC a Unique Diversifier</a> </div> <div>2024-09-20 15:51:33</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612202.html">Internet Computer (ICP) Price Prediction: Will ICP Price Hit $24?</a> </div> <div>2024-09-20 15:47:32</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612197.html">Worldcoin (WLD) Price Prediction 2022-23</a> </div> <div>2024-09-20 15:45:32</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612185.html">Top Meme Coins to Invest In Today</a> </div> <div>2024-09-20 15:39:32</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612183.html">Floki (FLOKI) Price Prediction: Will the Revamped Marketing Help Floki Catch Up on October Gains?</a> </div> <div>2024-09-20 15:38:32</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612161.html">Next Cryptocurrency to Explode: 5 Coins to Add to Your Watchlist</a> </div> <div>2024-09-20 15:27:32</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612159.html">Dogecoin: From an Internet Meme to a Digital Currency with a Billion-Dollar Market Capitalization</a> </div> <div>2024-09-20 15:26:32</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612129.html">ZChains Unveils a Series of Exciting Updates and Launches to Enhance Its Ecosystem</a> </div> <div>2024-09-20 15:12:32</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612099.html">How to download the Apple version of Little Fox Payment Platform</a> </div> <div>2024-09-20 14:53:01</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796612097.html">How beginners trade on MetaMask and its advantages and disadvantages</a> </div> <div>2024-09-20 14:51:01</div> </li> </ul> </div> <div class="wzconZzwz"> <div class="wzconZzwztitle">Latest Issues</div> <div class="wdsyContent"> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/176400.html" target="_blank" title="PHP arrays obtained from URL parameters do not behave as expected" class="wdcdcTitle">PHP arrays obtained from URL parameters do not behave as expected</a> <a href="http://www.php.cn/wenda/176400.html" class="wdcdcCons">I have a URL parameter that contains the category ID and I want to treat it as an array li...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 22:09:02</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>1428</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/176399.html" target="_blank" title="Move the content to the left by adding the Width property" class="wdcdcTitle">Move the content to the left by adding the Width property</a> <a href="http://www.php.cn/wenda/176399.html" class="wdcdcCons">I have provided margins to the body. main {left margin: 200px; right margin: 200px; text a...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 22:01:35</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>3</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>816</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/176396.html" target="_blank" title="The page suddenly cannot pull css or bootstrap" class="wdcdcTitle">The page suddenly cannot pull css or bootstrap</a> <a href="http://www.php.cn/wenda/176396.html" class="wdcdcCons">So I'm developing a page, I did part of it yesterday and it worked great, and today I cont...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 21:58:04</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>800</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/176392.html" target="_blank" title="Regular expression to match words" class="wdcdcTitle">Regular expression to match words</a> <a href="http://www.php.cn/wenda/176392.html" class="wdcdcCons">I have a script where I am trying to match new job names with existing job names in a data...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 21:24:04</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>606</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/176391.html" target="_blank" title="The query and formula form the entire table, with new columns, where the new columns are formulas involving other conditional column values" class="wdcdcTitle">The query and formula form the entire table, with new columns, where the new columns are formulas involving other conditional column values</a> <a href="http://www.php.cn/wenda/176391.html" class="wdcdcCons">EDIT: The formula should be the "value" column - the "value" column wi...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2024-04-06 21:23:40</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>2</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>530</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> </div> </div> <div class="wzconZt" > <div class="wzczt-title"> <div>Related Topics</div> <a href="http://www.php.cn/faq/zt" target="_blank">More> </a> </div> <div class="wzcttlist"> <ul> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/zmjlygwz"><img src="https://img.php.cn/upload/subject/202407/22/2024072214363078087.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="how to build a website" /> </a> <a target="_blank" href="http://www.php.cn/faq/zmjlygwz" class="title-a-spanl" title="how to build a website"><span>how to build a website</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/wzym"><img src="https://img.php.cn/upload/subject/202407/22/2024072214280489178.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="Website source code" /> </a> <a target="_blank" href="http://www.php.cn/faq/wzym" class="title-a-spanl" title="Website source code"><span>Website source code</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/smsssyq"><img src="https://img.php.cn/upload/subject/202407/22/2024072214262251604.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="what is search engine" /> </a> <a target="_blank" href="http://www.php.cn/faq/smsssyq" class="title-a-spanl" title="what is search engine"><span>what is search engine</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/dreamweaverss"><img src="https://img.php.cn/upload/subject/202407/22/2024072214195489034.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="What software is dreamweaver?" /> </a> <a target="_blank" href="http://www.php.cn/faq/dreamweaverss" class="title-a-spanl" title="What software is dreamweaver?"><span>What software is dreamweaver?</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/rhpbwz"><img src="https://img.php.cn/upload/subject/202407/22/2024072214105498409.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="How to block a website" /> </a> <a target="_blank" href="http://www.php.cn/faq/rhpbwz" class="title-a-spanl" title="How to block a website"><span>How to block a website</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/aspkfgjynx"><img src="https://img.php.cn/upload/subject/202407/22/2024072213561076772.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="What are the asp development tools?" /> </a> <a target="_blank" href="http://www.php.cn/faq/aspkfgjynx" class="title-a-spanl" title="What are the asp development tools?"><span>What are the asp development tools?</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/ynxmlssyq"><img src="https://img.php.cn/upload/subject/202407/22/2024072213505727266.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="What directory search engines are there?" /> </a> <a target="_blank" href="http://www.php.cn/faq/ynxmlssyq" class="title-a-spanl" title="What directory search engines are there?"><span>What directory search engines are there?</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/wzcjldjcff"><img src="https://img.php.cn/upload/subject/202407/22/2024072213453526973.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="Common website vulnerability detection methods" /> </a> <a target="_blank" href="http://www.php.cn/faq/wzcjldjcff" class="title-a-spanl" title="Common website vulnerability detection methods"><span>Common website vulnerability detection methods</span> </a> </li> </ul> </div> </div> </div> </div> <div class="phpwzright"> <div class="wzrOne"> <div class="wzroTitle">Popular Recommendations</div> <div class="wzroList"> <ul> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="How to set up hosts on Mac computer (steps with pictures and text)" href="http://www.php.cn/faq/448310.html">How to set up hosts on Mac computer (steps with pictures and text)</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="Quickly build a simple QQ robot with PHP" href="http://www.php.cn/faq/448391.html">Quickly build a simple QQ robot with PHP</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="API common signature verification methods (PHP implementation)" href="http://www.php.cn/faq/448286.html">API common signature verification methods (PHP implementation)</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="Collection of common date and time operations in PHP" href="http://www.php.cn/faq/448309.html">Collection of common date and time operations in PHP</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="PHP generates graphic verification code (enhanced interference type)" href="http://www.php.cn/faq/448308.html">PHP generates graphic verification code (enhanced interference type)</a> </div> </li> </ul> </div> </div> <script src="https://sw.php.cn/hezuo/cac1399ab368127f9b113b14eb3316d0.js" type="text/javascript"></script> <div class="wzrThree"> <div class="wzrthree-title"> <div>Popular Tutorials</div> <a target="_blank" href="http://www.php.cn/course.html">More> </a> </div> <div class="wzrthreelist swiper2"> <div class="wzrthreeTab swiper-wrapper"> <div class="check tabdiv swiper-slide" data-id="one">Related Tutorials <div></div></div> <div class="tabdiv swiper-slide" data-id="two">Popular Recommendations<div></div></div> <div class="tabdiv swiper-slide" data-id="three">Latest courses<div></div></div> </div> <ul class="one"> <li> <a target="_blank" href="http://www.php.cn/course/812.html" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg" alt="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)"/> </a> <div class="wzrthree-right"> <a target="_blank" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" href="http://www.php.cn/course/812.html">The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)</a> <div class="wzrthreerb"> <div>1408440 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="812"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/74.html" title="PHP introductory tutorial one: Learn PHP in one week" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/6253d1e28ef5c345.png" alt="PHP introductory tutorial one: Learn PHP in one week"/> </a> <div class="wzrthree-right"> <a target="_blank" title="PHP introductory tutorial one: Learn PHP in one week" href="http://www.php.cn/course/74.html">PHP introductory tutorial one: Learn PHP in one week</a> <div class="wzrthreerb"> <div>4241093 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="74"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/286.html" title="JAVA Beginner's Video Tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a2bacfd9379.png" alt="JAVA Beginner's Video Tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="JAVA Beginner's Video Tutorial" href="http://www.php.cn/course/286.html">JAVA Beginner's Video Tutorial</a> <div class="wzrthreerb"> <div>2438916 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="286"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/504.html" title="Little Turtle's zero-based introduction to learning Python video tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a67ce3a6655.png" alt="Little Turtle's zero-based introduction to learning Python video tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Little Turtle's zero-based introduction to learning Python video tutorial" href="http://www.php.cn/course/504.html">Little Turtle's zero-based introduction to learning Python video tutorial</a> <div class="wzrthreerb"> <div>500391 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="504"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/2.html" title="PHP zero-based introductory tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/6253de27bc161468.png" alt="PHP zero-based introductory tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="PHP zero-based introductory tutorial" href="http://www.php.cn/course/2.html">PHP zero-based introductory tutorial</a> <div class="wzrthreerb"> <div>838815 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="2"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> <ul class="two" style="display: none;"> <li> <a target="_blank" href="http://www.php.cn/course/812.html" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg" alt="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)"/> </a> <div class="wzrthree-right"> <a target="_blank" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" href="http://www.php.cn/course/812.html">The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)</a> <div class="wzrthreerb"> <div >1408440 times of learning</div> <div class="courseICollection" data-id="812"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/286.html" title="JAVA Beginner's Video Tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a2bacfd9379.png" alt="JAVA Beginner's Video Tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="JAVA Beginner's Video Tutorial" href="http://www.php.cn/course/286.html">JAVA Beginner's Video Tutorial</a> <div class="wzrthreerb"> <div >2438916 times of learning</div> <div class="courseICollection" data-id="286"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/504.html" title="Little Turtle's zero-based introduction to learning Python video tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a67ce3a6655.png" alt="Little Turtle's zero-based introduction to learning Python video tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Little Turtle's zero-based introduction to learning Python video tutorial" href="http://www.php.cn/course/504.html">Little Turtle's zero-based introduction to learning Python video tutorial</a> <div class="wzrthreerb"> <div >500391 times of learning</div> <div class="courseICollection" data-id="504"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/901.html" title="Quick introduction to web front-end development" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/64be28a53a4f6310.png" alt="Quick introduction to web front-end development"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Quick introduction to web front-end development" href="http://www.php.cn/course/901.html">Quick introduction to web front-end development</a> <div class="wzrthreerb"> <div >214613 times of learning</div> <div class="courseICollection" data-id="901"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/234.html" title="Master PS video tutorials from scratch" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62611f57ed0d4840.jpg" alt="Master PS video tutorials from scratch"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Master PS video tutorials from scratch" href="http://www.php.cn/course/234.html">Master PS video tutorials from scratch</a> <div class="wzrthreerb"> <div >865980 times of learning</div> <div class="courseICollection" data-id="234"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> <ul class="three" style="display: none;"> <li> <a target="_blank" href="http://www.php.cn/course/1648.html" title="[Web front-end] Node.js quick start" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662b5d34ba7c0227.png" alt="[Web front-end] Node.js quick start"/> </a> <div class="wzrthree-right"> <a target="_blank" title="[Web front-end] Node.js quick start" href="http://www.php.cn/course/1648.html">[Web front-end] Node.js quick start</a> <div class="wzrthreerb"> <div >5291 times of learning</div> <div class="courseICollection" data-id="1648"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1647.html" title="Complete collection of foreign web development full-stack courses" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/6628cc96e310c937.png" alt="Complete collection of foreign web development full-stack courses"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Complete collection of foreign web development full-stack courses" href="http://www.php.cn/course/1647.html">Complete collection of foreign web development full-stack courses</a> <div class="wzrthreerb"> <div >4069 times of learning</div> <div class="courseICollection" data-id="1647"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1646.html" title="Go language practical GraphQL" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662221173504a436.png" alt="Go language practical GraphQL"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Go language practical GraphQL" href="http://www.php.cn/course/1646.html">Go language practical GraphQL</a> <div class="wzrthreerb"> <div >3484 times of learning</div> <div class="courseICollection" data-id="1646"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1645.html" title="550W fan master learns JavaScript from scratch step by step" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662077e163124646.png" alt="550W fan master learns JavaScript from scratch step by step"/> </a> <div class="wzrthree-right"> <a target="_blank" title="550W fan master learns JavaScript from scratch step by step" href="http://www.php.cn/course/1645.html">550W fan master learns JavaScript from scratch step by step</a> <div class="wzrthreerb"> <div >575 times of learning</div> <div class="courseICollection" data-id="1645"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1644.html" title="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/6616418ca80b8916.png" alt="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours" href="http://www.php.cn/course/1644.html">Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours</a> <div class="wzrthreerb"> <div >17853 times of learning</div> <div class="courseICollection" data-id="1644"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> </div> <script> var mySwiper = new Swiper('.swiper2', { autoplay: false,//可选选项,自动滑动 slidesPerView : 'auto', }) $('.wzrthreeTab>div').click(function(e){ $('.wzrthreeTab>div').removeClass('check') $(this).addClass('check') $('.wzrthreelist>ul').css('display','none') $('.'+e.currentTarget.dataset.id).show() }) </script> </div> <div class="wzrFour"> <div class="wzrfour-title"> <div>Latest Downloads</div> <a href="http://www.php.cn/xiazai">More> </a> </div> <script> $(document).ready(function(){ var sjyx_banSwiper = new Swiper(".sjyx_banSwiperwz",{ speed:1000, autoplay:{ delay:3500, disableOnInteraction: false, }, pagination:{ el:'.sjyx_banSwiperwz .swiper-pagination', clickable :false, }, loop:true }) }) </script> <div class="wzrfourList swiper3"> <div class="wzrfourlTab swiper-wrapper"> <div class="check swiper-slide" data-id="onef">Web Effects <div></div></div> <div class="swiper-slide" data-id="twof">Website Source Code<div></div></div> <div class="swiper-slide" data-id="threef">Website Materials<div></div></div> <div class="swiper-slide" data-id="fourf">Front End Template<div></div></div> </div> <ul class="onef"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery enterprise message form contact code" href="http://www.php.cn/xiazai/js/8071">[form button] jQuery enterprise message form contact code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="HTML5 MP3 music box playback effects" href="http://www.php.cn/xiazai/js/8070">[Player special effects] HTML5 MP3 music box playback effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="HTML5 cool particle animation navigation menu special effects" href="http://www.php.cn/xiazai/js/8069">[Menu navigation] HTML5 cool particle animation navigation menu special effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery visual form drag and drop editing code" href="http://www.php.cn/xiazai/js/8068">[form button] jQuery visual form drag and drop editing code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="VUE.JS imitation Kugou music player code" href="http://www.php.cn/xiazai/js/8067">[Player special effects] VUE.JS imitation Kugou music player code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="Classic html5 pushing box game" href="http://www.php.cn/xiazai/js/8066">[html5 special effects] Classic html5 pushing box game</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery scrolling to add or reduce image effects" href="http://www.php.cn/xiazai/js/8065">[Picture special effects] jQuery scrolling to add or reduce image effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="CSS3 personal album cover hover zoom effect" href="http://www.php.cn/xiazai/js/8064">[Photo album effects] CSS3 personal album cover hover zoom effect</a> </div> </li> </ul> <ul class="twof" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8328" title="Home Decor Cleaning and Repair Service Company Website Template" target="_blank">[Front-end template] Home Decor Cleaning and Repair Service Company Website Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8327" title="Fresh color personal resume guide page template" target="_blank">[Front-end template] Fresh color personal resume guide page template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8326" title="Designer Creative Job Resume Web Template" target="_blank">[Front-end template] Designer Creative Job Resume Web Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8325" title="Modern engineering construction company website template" target="_blank">[Front-end template] Modern engineering construction company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8324" title="Responsive HTML5 template for educational service institutions" target="_blank">[Front-end template] Responsive HTML5 template for educational service institutions</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8323" title="Online e-book store mall website template" target="_blank">[Front-end template] Online e-book store mall website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8322" title="IT technology solves Internet company website template" target="_blank">[Front-end template] IT technology solves Internet company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8321" title="Purple style foreign exchange trading service website template" target="_blank">[Front-end template] Purple style foreign exchange trading service website template</a> </div> </li> </ul> <ul class="threef" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3078" target="_blank" title="Cute summer elements vector material (EPS PNG)">[PNG material] Cute summer elements vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3077" target="_blank" title="Four red 2023 graduation badges vector material (AI EPS PNG)">[PNG material] Four red 2023 graduation badges vector material (AI EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3076" target="_blank" title="Singing bird and cart filled with flowers design spring banner vector material (AI EPS)">[banner picture] Singing bird and cart filled with flowers design spring banner vector material (AI EPS)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3075" target="_blank" title="Golden graduation cap vector material (EPS PNG)">[PNG material] Golden graduation cap vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3074" target="_blank" title="Black and white style mountain icon vector material (EPS PNG)">[PNG material] Black and white style mountain icon vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3073" target="_blank" title="Superhero silhouette vector material (EPS PNG) with different color cloaks and different poses">[PNG material] Superhero silhouette vector material (EPS PNG) with different color cloaks and different poses</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3072" target="_blank" title="Flat style Arbor Day banner vector material (AI+EPS)">[banner picture] Flat style Arbor Day banner vector material (AI+EPS)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3071" target="_blank" title="Nine comic-style exploding chat bubbles vector material (EPS+PNG)">[PNG material] Nine comic-style exploding chat bubbles vector material (EPS+PNG)</a> </div> </li> </ul> <ul class="fourf" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8328" target="_blank" title="Home Decor Cleaning and Repair Service Company Website Template">[Front-end template] Home Decor Cleaning and Repair Service Company Website Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8327" target="_blank" title="Fresh color personal resume guide page template">[Front-end template] Fresh color personal resume guide page template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8326" target="_blank" title="Designer Creative Job Resume Web Template">[Front-end template] Designer Creative Job Resume Web Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8325" target="_blank" title="Modern engineering construction company website template">[Front-end template] Modern engineering construction company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8324" target="_blank" title="Responsive HTML5 template for educational service institutions">[Front-end template] Responsive HTML5 template for educational service institutions</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8323" target="_blank" title="Online e-book store mall website template">[Front-end template] Online e-book store mall website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8322" target="_blank" title="IT technology solves Internet company website template">[Front-end template] IT technology solves Internet company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8321" target="_blank" title="Purple style foreign exchange trading service website template">[Front-end template] Purple style foreign exchange trading service website template</a> </div> </li> </ul> </div> <script> var mySwiper = new Swiper('.swiper3', { autoplay: false,//可选选项,自动滑动 slidesPerView : 'auto', }) $('.wzrfourlTab>div').click(function(e){ $('.wzrfourlTab>div').removeClass('check') $(this).addClass('check') $('.wzrfourList>ul').css('display','none') $('.'+e.currentTarget.dataset.id).show() }) </script> </div> </div> </div> <div class="phpFoot"> <div class="phpFootIn"> <div class="phpFootCont"> <div class="phpFootLeft"> <dl> <dt> <a href="http://www.php.cn/about/us.html" rel="nofollow" target="_blank" title="About us" class="cBlack">About us</a> <a href="http://www.php.cn/about/disclaimer.html" rel="nofollow" target="_blank" title="Disclaimer" class="cBlack">Disclaimer</a> <a href="http://www.php.cn/update/article_0_1.html" target="_blank" title="Sitemap" class="cBlack">Sitemap</a> <div class="clear"></div> </dt> <dd class="cont1">php.cn:Public welfare online PHP training,Help PHP learners grow quickly!</dd> </dl> </div> </div> </div> </div> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1728314537"></script> <script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all'/> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> </body> </html>