PHP技巧:PHP腳本中關(guān)于拼寫檢查函數(shù)庫_PHP教程
推薦:PHP技巧:Smarty adodb分頁示例利用Smarty adodb分頁示例, 下面給出的是分頁部份的代碼。 分頁文件:page.lbi 以下為引用的內(nèi)容: <table width="100%"
aspell_new : 載入一個新的字典。
aspell_check : 檢查一個單字。
aspell_check-raw : 檢查一個單字,即使拼錯也不改變或修正。
aspell_suggest : 檢查一個單字,并提供拼寫建議。
aspell_new
載入一個新的字典。
語法:int aspell_new(string master, string personal);
返回值:整數(shù)
函數(shù)種類:資料處理
內(nèi)容說明 本函數(shù)載入一個新的字典,并賦與一個新的身份值 (整數(shù)),以供程序中使用。
使用范例 $aspell_link=aspell_new("english");
aspell_check
檢查一個單字。
語法:boolean aspell_check(int dictionary_link, string word);
返回值:布爾值
函數(shù)種類:資料處理
內(nèi)容說明 本函數(shù)檢查單字的拼寫。若拼寫正確則返回 true,不正確則返回 false。
使用范例
| 以下為引用的內(nèi)容: $aspell_link=aspell_new("english"); if (aspell_check($aspell_link,"testt")) { echo "this is a valid spelling"; } else { echo "sorry, wrong spelling"; } aspell_check-raw |
檢查一個單字,即使拼錯也不改變或修正。
語法:boolean aspell_check_raw(int dictionary_link, string word);
返回值:布爾值
函數(shù)種類:資料處理
內(nèi)容說明
本函數(shù)檢查單字的拼寫。若拼寫正確則返回 true,不正確則返回 false。本函數(shù)不會改變或者修正使用者的拼寫。
使用范例
| 以下為引用的內(nèi)容: $aspell_link=aspell_new("english"); if (aspell_check_raw($aspell_link,"testt")) { echo "this is a valid spelling"; } else { echo "sorry, wrong spelling"; } aspell_suggest |
檢查一個單字,并提供拼寫建議。
語法:array aspell_suggest(int dictionary_link, string word);
返回值:數(shù)組
函數(shù)種類:資料處理
內(nèi)容說明
本函數(shù)檢查單字的拼寫。并給予可能的拼法及正確的建議,以數(shù)組類型將結(jié)果返回。
使用范例
| 以下為引用的內(nèi)容: <? |
分享:PHP技巧:詳解phplib模板使用過程及運(yùn)行原理index.htm文件內(nèi)容: 以下為引用的內(nèi)容: <html> <head> <body> <!-- BEGIN RowSort --> {SortList}<br>
- PHPNOW安裝Memcached擴(kuò)展方法詳解
- php記錄頁面代碼執(zhí)行時間
- PHP中獎概率的抽獎算法程序代碼
- apache設(shè)置靜態(tài)文件緩存方法介紹
- php對圖像的各種處理函數(shù)代碼小結(jié)
- PHP 關(guān)于訪問控制的和運(yùn)算符優(yōu)先級介紹
- 關(guān)于PHP語言構(gòu)造器介紹
- php/js獲取客戶端mac地址的實現(xiàn)代碼
- php5.5新數(shù)組函數(shù)array_column使用
- PHP preg_match的匹配多國語言的技巧
- php 中序列化和json使用介紹
- php采集文章中的圖片獲取替換到本地
- 相關(guān)鏈接:
- 教程說明:
PHP教程-PHP技巧:PHP腳本中關(guān)于拼寫檢查函數(shù)庫
。