aspell_new : 載入一個(gè)新的字典。
aspell_check : 檢查一個(gè)單字。
aspell_check-raw : 檢查一個(gè)單字,即使拼錯(cuò)也不改變或修正。
aspell_suggest : 檢查一個(gè)單字,并提供拼寫建議。
aspell_new
載入一個(gè)新的字典。
語(yǔ)法:int aspell_new(string master, string personal);
返回值:整數(shù)
函數(shù)種類:資料處理
內(nèi)容說(shuō)明 本函數(shù)載入一個(gè)新的字典,并賦與一個(gè)新的身份值 (整數(shù)),以供程序中使用。
使用范例 $aspell_link=aspell_new("english");
aspell_check
檢查一個(gè)單字。
語(yǔ)法:boolean aspell_check(int dictionary_link, string word);
返回值:布爾值
函數(shù)種類:資料處理
內(nèi)容說(shuō)明 本函數(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 |
檢查一個(gè)單字,即使拼錯(cuò)也不改變或修正。
語(yǔ)法:boolean aspell_check_raw(int dictionary_link, string word);
返回值:布爾值
函數(shù)種類:資料處理
內(nèi)容說(shuō)明
本函數(shù)檢查單字的拼寫。若拼寫正確則返回 true,不正確則返回 false。本函數(shù)不會(huì)改變或者修正使用者的拼寫。
使用范例
| 以下為引用的內(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 |
檢查一個(gè)單字,并提供拼寫建議。
語(yǔ)法:array aspell_suggest(int dictionary_link, string word);
返回值:數(shù)組
函數(shù)種類:資料處理
內(nèi)容說(shuō)明
本函數(shù)檢查單字的拼寫。并給予可能的拼法及正確的建議,以數(shù)組類型將結(jié)果返回。
使用范例
| 以下為引用的內(nèi)容: <? |
新聞熱點(diǎn)
疑難解答