① 誰幫我做個 php 做的搜索引擎

搜索引擎。。。不是很困難吧。。。我想說你是個shabi

② php 分詞,搜索引擎,技術

你好,很高興為你解答:

如果你僅僅是要把長句中的單詞分出來,那是很簡單的:

<?php
$str="GoogleTranslateforBusiness!";
$str=preg_replace("{.|,|;|:|'|"|?|!|<|>|(|)}","",$str);//移除所有標點符號
$arr=array_unique(explode("",$str));//以空格分割,並去重
var_mp($arr);
?>

以下是一段測試文本:

(asseeninCorPerl),"something"(inthiscase,output"Hi,I'maPHPscript!").<?phpand?>"PHPmode."
-,.,.,andthenthere'.
,.Don''sfeatures.Youcanjumpin,inashorttime,.
AlthoughPHP'sdevelopmentisfocusedonserver-sidescripting,youcandomuchmorewithit.Readon,andseemoreintheWhatcanPHPdo?section,.

輸出結果:

Instead,of,lots,commands,to,output,html,as,seen,in,C,or,Perl,PHP,pages,contain,with,embedded,code,that,does,something,this,case,Hi,Im,a,script,The,is,enclosed,special,start,and,end,processing,instructions,php,,allow,you,jump,into,out,modeWhat,distinguishes,from,like,client-side,javaScript,the,executed,on,server,generating,which,then,sent,client,would,receive,results,running,but,not,know,what,underlying,was,You,can,even,configure,your,web,process,all,files,theres,really,no,way,users,tell,have,up,sleeveThe,best,things,using,are,it,extremely,simple,for,newcomer,offers,many,advanced,features,professional,programmer,Dont,be,afraid,reading,long,list,PHPs,short,time,writing,scripts,few,hoursAlthough,development,focused,server-side,scripting,do,much,more,Read,see,What,section,go,right,introctory,tutorial,if,only,interested,programming

使用sort()對其進行排序:

C,Dont,HTML,Hi,Im,Instead,JavaScript,PHP,PHPs,Perl,Read,The,What,You,a,advanced,afraid,all,allow,and,are,as,be,best,but,can,case,client,client-side,code,commands,configure,contain,development,distinguishes,do,does,embedded,enclosed,end,even,executed,extremely,features,few,files,focused,for,from,generating,go,have,hoursAlthough,if,in,instructions,interested,into,introctory,is,it,jump,know,like,list,long,lots,many,modeWhat,more,much,newcomer,no,not,of,offers,on,only,or,out,output,pages,php,process,processing,professional,programmer,programming,reading,really,receive,results,right,running,script,scripting,scripts,section,see,seen,sent,server,server-side,short,simple,sleeveThe,something,special,start,tell,that,the,then,theres,things,this,time,to,tutorial,underlying,up,users,using,was,way,web,what,which,with,would,writing,you,your

-----------------------------------
如有疑問歡迎追問!
滿意請點擊右上方【選為滿意回答】按鈕么么噠 o(∩_∩)o

③ 開源 中文php搜索引擎有哪些

某目前接觸到的只有lucene和coreseek了
lucene更多是用在java方面的,但是也可以和php結合起來用
coreseek和php結合使用比較好,官方文檔說的很詳細
君且自學自勉哇

④ 用PHP如何編寫搜索引擎

大型的購物網站 太復雜 最好用 開源的 什麼ecshop。。。好多 你要是自己寫購物 慢慢努力吧

⑤ PHP全文索引、搜索引擎

http://wenku..com/view/40b10e63ddccda38376baf90.html這是一個網路文庫的資料,如果你又賬號,最好下載下來回看,應該答不錯

⑥ 如何用PHP製作搜索引擎

這樣抄看你做什麼樣的搜索,如果要做全站搜索的話,只用資料庫搜索做起來會比較困難,會遇到要檢索的數據存在不同的表中,甚至不同的庫中,如果是全站搜索的話,建議用sphinx或者lucener,如果只是某個表內容搜索的話,sql:select * from 表名 where 列名 like '%值%' ;然後循環 mysql_fetch_array() 或 mysql_fetch_assoc() 或 mysql_fetch_object() 或 mysql_fetch_row()都取一行記錄,把記錄循環出來就可以了。

⑦ 關於搜索功能那個php代碼,能再詳細點嗎

資料庫(mysql):一個資料庫(search),庫裡面一個表(title),表裡面一個欄位(name).
PHP頁面:兩個頁面(index.php
search.php)
第一步.創建資料庫.(目前大家應該都是用的phpmyadmin來操作資料庫的吧?)
建立一個資料庫.

第二步.建表
在剛建立的search資料庫里插入一個名字為title的表.建表時讓選插入幾個欄位.寫1就可以了.

第三步.建欄位
插入的欄位命名為name,長度值20就可以了.

—–資料庫部分已經做完,接下來是網頁部分—–

第四步.建立兩個頁面
建立兩個文件:index.php和search.php可以使用記事本等文本工具直接建立.我使用的工具是Dreamweaver(方便嘛.呵呵).

第五步.index.php的頁面製作.
這個頁面是用來傳遞你搜索的關鍵字的.代碼如下:
<form method=」post」
action=」search.php」
name=」search」>
<input name=」search」 type=」text」 value=」"
size=」15″> <input type=」submit」
value=」Search」>
</form>
這段代碼是建立一個FORM表單.專門用來提交數據的.
第一行是FORM表單的開始.它的傳遞方式是post,傳遞到search.php這個頁面.表單名為name.
第二行是文本域和提交按鈕.文本域命名為search,按鈕默認就可以了.
第三行是FORM表單的結束語句.

第五步.search.php的頁面製作.
這個頁面很關鍵.因為他是獲取index頁面傳遞過來的值,然後導出搜索的數據.
首先要綁定你建立的search資料庫,我用的DW生成的.
上一個頁面傳送的文本域是search.所以,這里需要建立一個search變數.來接收你輸入的關鍵詞.用以下語句定義變數:
<?php
$searchs = $_POST['search'];
?>

然後建立一個記錄集,選擇高級.SQL語句中填寫:
SELECT *

FROM title

WHERE name like
『%$searchs%』

這句的意思是選擇title表裡面的所有欄位(*),然後查詢name中的$searchs變數。這個變數也就是你在index中輸入的值啦。

然後在BODY裡面綁定一個動態文本。選擇NAME。

⑧ php做搜索引擎的問題

搜索前可以用php_replace過濾掉加亮語句就可以了。

⑨ 百度搜索引擎是用PHP編寫的嗎

apache有一個模塊叫rewriter.so
可以把請求轉到.php或者jsp都行

⑩ php可以做搜索引擎嗎

大部分知名網站後台都是使用PHP處理的,那是因為PHP的LAMP深得人心.
就像PHPCHINA的FANS們年度采訪各大網站技術版總監說的權那樣,使用LAMP是因為不用花錢,速度還可以,但是對於重要的數據使用ORACLE,那是因為,ORACLE花了大價錢,就會有大的服務,LAMP都是免費的!