• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • 位置: php 中文手册 -> php 外部扩展库

    pspell库(检测拼写)

    安装

    如果有所需的库,请在编译PHP时添加--with pspell[=dir]选项

    Note to Win32 Users
    为了使此扩展生效, DLL 文件必须能在 Windows 系统的 PATH 指示的路径下找到。如何操作的信息,请参见题为“如何在 Windows 中将 PHP 目录加到 PATH 中”的FAQ。虽然将 DLL 文件从 PHP 文件夹复制到 Windows 系统目录也行,但不建议这样做。 此扩展需要下列文件在 PATH 路径中: aspell-15.dll 从aspell安装的bin文件夹.Win32 support requires at least aspell version 0.50.
    Aspell + PHP + Windows was giving me just crazy crashes with this simple test file:
    <?php
    $pspell_link = pspell_new("en");
    ?>
    Running "php -f test.php" directly from a DOS prompt shed some light:
    ----------------
    The file "C:\Program Files\Aspell\data/iso8859-1.dat" can not be opened for reading.pell\dict/en-only.rws:
    ----------------
    To fix it I needed to "dos2unix" all the files in Aspell's C:\Program Files\Aspell\data\ directory.  (Convert them from CRLF to just LF line endings).