<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Pspell Functions</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="函数参考" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="ps_translate" HREF="function.ps-translate.html"><LINK REL="NEXT" TITLE="pspell_add_to_personal" HREF="function.pspell-add-to-personal.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP 手册</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.ps-translate.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.pspell-add-to-personal.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.pspell" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >CXXXII. Pspell Functions</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN194370" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="pspell.intro" >简介</A ></H1 ><P > These functions allow you to check the spelling of a word and offer suggestions. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="pspell.requirements" >需求</A ></H1 ><P > To compile PHP with pspell support, you need the aspell library, available from <A HREF="http://aspell.sourceforge.net/" TARGET="_top" >http://aspell.sourceforge.net/</A >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="pspell.installation" >安装</A ></H1 ><P > If you have the libraries needed add the <CODE CLASS="option" >--with-pspell[=dir]</CODE > option when compiling PHP. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note to Win32 Users: </B > In order for this extension to work, there are <ACRONYM CLASS="acronym" >DLL</ACRONYM > files that must be available to the Windows system <TT CLASS="literal" >PATH</TT >. See the <ACRONYM CLASS="acronym" >FAQ</ACRONYM > titled "<A HREF="faq.installation.html#faq.installation.addtopath" >How do I add my PHP directory to the PATH on Windows</A >" for information on how to do this. Although copying DLL files from the PHP folder into the Windows system directory also works (because the system directory is by default in the systems <TT CLASS="literal" >PATH</TT >), it is not recommended. <SPAN CLASS="emphasis" ><I CLASS="emphasis" >This extension requires the following files to be in the <TT CLASS="literal" >PATH</TT >:</I ></SPAN > <TT CLASS="filename" >aspell-15.dll</TT > from the <TT CLASS="filename" >bin</TT > folder of the aspell installation. </P ><P > Win32 support is available only in PHP 4.3.3 and later versions. Also, at least aspell version 0.50 is required. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="pspell.configuration" >运行时配置</A ></H1 ><P >本扩展模块在 <TT CLASS="filename" >php.ini</TT > 中未定义任何配置选项。</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="pspell.resources" >资源类型</A ></H1 ><P >本扩展模块未定义任何资源类型。</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="pspell.constants" >预定义常量</A ></H1 ><P >以下常量由本扩展模块定义,因此只有在本扩展模块被编译到 PHP 中,或者在运行时被动态加载后才有效。</P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><TT CLASS="constant" ><B >PSPELL_FAST</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >PSPELL_NORMAL</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >PSPELL_BAD_SPELLERS</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ><DT ><TT CLASS="constant" ><B >PSPELL_RUN_TOGETHER</B ></TT > (<A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A >)</DT ><DD ><P > </P ></DD ></DL ></DIV ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >目录</B ></DT ><DT ><A HREF="function.pspell-add-to-personal.html" >pspell_add_to_personal</A > -- Add the word to a personal wordlist</DT ><DT ><A HREF="function.pspell-add-to-session.html" >pspell_add_to_session</A > -- Add the word to the wordlist in the current session </DT ><DT ><A HREF="function.pspell-check.html" >pspell_check</A > -- Check a word</DT ><DT ><A HREF="function.pspell-clear-session.html" >pspell_clear_session</A > -- Clear the current session</DT ><DT ><A HREF="function.pspell-config-create.html" >pspell_config_create</A > -- Create a config used to open a dictionary</DT ><DT ><A HREF="function.pspell-config-data-dir.html" >pspell_config_data_dir</A > -- location of language data files </DT ><DT ><A HREF="function.pspell-config-dict-dir.html" >pspell_config_dict_dir</A > -- Location of the main word list </DT ><DT ><A HREF="function.pspell-config-ignore.html" >pspell_config_ignore</A > -- Ignore words less than N characters long</DT ><DT ><A HREF="function.pspell-config-mode.html" >pspell_config_mode</A > -- Change the mode number of suggestions returned</DT ><DT ><A HREF="function.pspell-config-personal.html" >pspell_config_personal</A > -- Set a file that contains personal wordlist</DT ><DT ><A HREF="function.pspell-config-repl.html" >pspell_config_repl</A > -- Set a file that contains replacement pairs</DT ><DT ><A HREF="function.pspell-config-runtogether.html" >pspell_config_runtogether</A > -- Consider run-together words as valid compounds</DT ><DT ><A HREF="function.pspell-config-save-repl.html" >pspell_config_save_repl</A > -- Determine whether to save a replacement pairs list along with the wordlist</DT ><DT ><A HREF="function.pspell-new-config.html" >pspell_new_config</A > -- Load a new dictionary with settings based on a given config </DT ><DT ><A HREF="function.pspell-new-personal.html" >pspell_new_personal</A > -- Load a new dictionary with personal wordlist</DT ><DT ><A HREF="function.pspell-new.html" >pspell_new</A > -- Load a new dictionary</DT ><DT ><A HREF="function.pspell-save-wordlist.html" >pspell_save_wordlist</A > -- Save the personal wordlist to a file</DT ><DT ><A HREF="function.pspell-store-replacement.html" >pspell_store_replacement</A > -- Store a replacement pair for a word</DT ><DT ><A HREF="function.pspell-suggest.html" >pspell_suggest</A > -- Suggest spellings of a word</DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.ps-translate.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >起始页</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.pspell-add-to-personal.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >ps_translate</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >pspell_add_to_personal</TD ></TR ></TABLE ></DIV ></BODY ></HTML >