Pspell Functions
簡介
These functions allow you to check the spelling of a word and offer suggestions.
需求
To compile PHP with pspell support, you need the aspell library, available from » https://aspell.sourceforge.net/.
安裝
If you have the libraries needed add the --with-pspell[=dir] option when compiling PHP.
Note: Note to Win32 Users 需要有DLL檔案存在於PATH的Windows系統上,來使此擴充功能運作。參見FAQ主題為"如何增加PHP目錄至Windows上的PATH環境變數",可獲得如何完成這些步驟的資訊。雖然從PHP資料夾複製DLL檔案至Windows系統目錄也可行(因為PATH預設包含系統目錄),不過不建議這樣做。此擴充功能需要以下檔案存在PATH中: aspell-15.dll from the bin folder of the aspell installation.
Win32 support is available only in PHP 4.3.3 and later versions. Also, at least aspell version 0.50 is required.
執行時期設定
本擴充功能在 php.ini 中未定義任何設定選項。
資源類型
本擴充功能未定義任何資源類型。
Table of Contents
- pspell_add_to_personal — Add the word to a personal wordlist
- pspell_add_to_session — Add the word to the wordlist in the current session
- pspell_check — Check a word
- pspell_clear_session — Clear the current session
- pspell_config_create — Create a config used to open a dictionary
- pspell_config_data_dir — location of language data files
- pspell_config_dict_dir — Location of the main word list
- pspell_config_ignore — Ignore words less than N characters long
- pspell_config_mode — Change the mode number of suggestions returned
- pspell_config_personal — Set a file that contains personal wordlist
- pspell_config_repl — Set a file that contains replacement pairs
- pspell_config_runtogether — Consider run-together words as valid compounds
- pspell_config_save_repl — Determine whether to save a replacement pairs list along with the wordlist
- pspell_new_config — Load a new dictionary with settings based on a given config
- pspell_new_personal — Load a new dictionary with personal wordlist
- pspell_new — Load a new dictionary
- pspell_save_wordlist — Save the personal wordlist to a file
- pspell_store_replacement — Store a replacement pair for a word
- pspell_suggest — Suggest spellings of a word