我PHP 8
在 Xampp (Windows) 上使用
已添加extension=php_enchant.dll
到php.ini
- php 目录添加到 windows PATH
- 复制
libenchant_hunspell.dll / libenchant_ispell.dll / libenchant_myspell.dll
到[php]/lib/enchant
- 搬到
*.dic
&*.aff
到[php]/share/myspell/dicts
但仍然无法让Enchant检测到 Brokers
示例代码
<?php
$broker = enchant_broker_init();
$tag = 'en_US';
$bprovides = enchant_broker_describe($broker);
echo "Current broker provides the following backend(s):\n";
print_r($bprovides);
输出
Current broker provides the following backend(s): Array ( ) Current broker provides the following dictionaries: Array ( )