如果檔案不存在,則不會出現錯誤。因此,如果您正在除錯,請檢查檔案是否確實存在。
(PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8)
pspell_config_personal — 設定包含個人單字清單的檔案
設定包含個人單字清單的檔案。在呼叫 pspell_new_config() 之後,除了標準單字清單之外,還會載入並使用個人單字清單。該檔案也是 pspell_save_wordlist() 儲存個人單字清單的檔案。
pspell_config_personal() 應該在呼叫 pspell_new_config() 之前用於設定。
版本 | 說明 |
---|---|
8.1.0 | config 參數現在需要一個 PSpell\Config 實例;以前需要一個 資源。 |
範例 #1 pspell_config_personal()
<?php
$pspell_config = pspell_config_create("en");
pspell_config_personal($pspell_config, "/var/dictionaries/custom.pws");
$pspell = pspell_new_config($pspell_config);
pspell_check($pspell, "thecat");
?>
注意:
除非您使用 pspell .11.2 和 aspell .32.5 或更高版本,否則此函式將無法運作。