2016-09-21 51 views
0

我剛剛切換到與godaddy cpanel服務器。我完全與pspell集成,它工作得很好。現在我得到了以下錯誤位於服務器上的aspell庫在哪裏?我如何檢查他們?

Warning: pspell_new(): PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "en". 

這是我的代碼

$pspell_config = pspell_config_create("en"); 
pspell_config_personal($pspell_config, "/home/user/public_html/custom.pws"); 
pspell_config_repl($pspell_config, "/home/user/public_html/custom.repl"); 
$pspell_link = pspell_new_config($pspell_config); 

error_reporting(E_ALL); 
@ini_set('display_errors', 1); 

// Call it once first because of a bug in Windows' Aspell. 
pspell_new('en'); 

$test = pspell_new('en'); 

echo ' 
    Testing pspell.... ', pspell_check($test,'thisisnotawordandyouknowit') ? 'failure' : 'pass', '.<br /> 
    If no error messages were displayed, Aspell is installed and working properly.'; 

我該如何定位我的服務器上的語言文件或測試呢?我打電話給godaddy,他們說aspell已經建立,我測試了我的php,它說pspell已啓用。

回答

0

多次打電話給godaddy後,他們終於告訴我aspell沒有配置好。但要回答這個問題。您的託管公司應該知道在哪裏可以找到這些庫。更進一步,你甚至不需要知道目錄所在的位置。您應該只需要調用到pspell:在你的php.ini文件,如下所示:

extension=php_zip.dll 
extension=aspell-15.dll 
extension=php_pspell.dll 

大多數時候,你不應該甚至,調用這些MODS在php.ini文件中,如果aspell和pspell配置正確。