这件事很好,然后我转到了哥爸爸的cpanel。如果我用我的php信息运行一个测试,它会说p拼写是启用的。有没有人知道测试错误的方法,甚至可能是修复方法?
$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);我正在用下面的代码测试我的代码。这让我知道它是否有效,但不会抛出错误!
$pspell_link = pspell_new("en");
$word = "color";
if (pspell_check($pspell_link, $word)) {
echo "Found a fix.";
} else {
echo "Sorry we are working on our search engines, please bare with us!";
}发布于 2016-09-19 20:29:27
我找到了这段代码。
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.';此显示错误用于p拼写,而无需通过php.ini运行错误检查。
https://stackoverflow.com/questions/39580129
复制相似问题