<HTML ><HEAD ><TITLE >GNU Readline</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="Function Reference" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="pspell_suggest" HREF="function.pspell-suggest.html"><LINK REL="NEXT" TITLE="readline_add_history" HREF="function.readline-add-history.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></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 Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.pspell-suggest.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.readline-add-history.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.readline" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >LXXXVI. GNU Readline</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN80587" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.intro" ></A >Introduction</H1 ><P > The <A HREF="function.readline.html" ><B CLASS="function" >readline()</B ></A > functions implement an interface to the GNU Readline library. These are functions that provide editable command lines. An example being the way Bash allows you to use the arrow keys to insert characters or scroll through command history. Because of the interactive nature of this library, it will be of little use for writing Web applications, but may be useful when writing scripts meant <A HREF="features.commandline.html" >using PHP from the command line</A >. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >This extension is not available on Windows platforms.</P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.requirements" ></A >Requirements</H1 ><P > To use the readline functions, you need to install libreadline. You can find libreadline on the home page of the GNU Readline project, at <A HREF="http://cnswww.cns.cwru.edu/~chet/readline/rltop.html" TARGET="_top" >http://cnswww.cns.cwru.edu/~chet/readline/rltop.html</A >. It's maintained by Chet Ramey, who's also the author of Bash. </P ><P > You can also use this functions with the libedit library, a non-GPL replacement for the readline library. The libedit library is BSD licensend and available for download from <A HREF="http://cnswww.cns.cwru.edu/~chet/readline/rltop.html" TARGET="_top" >http://sourceforge.net/projects/libedit/</A >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.installation" ></A >Installation</H1 ><P > To use this functions you must compile the CGI or CLI version of PHP with readline support. You need to configure PHP <TT CLASS="option" >--with-readline[=DIR]</TT >. In order you want to use the libedit readline replacement, configure PHP <TT CLASS="option" >--with-libedit[=DIR]</TT >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.configuration" ></A >Runtime Configuration</H1 ><P >This extension has no configuration directives defined in <TT CLASS="filename" >php.ini</TT >.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.resources" ></A >Resource Types</H1 ><P >This extension has no resource types defined.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.constants" ></A >Predefined Constants</H1 ><P >This extension has no constants defined.</P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT ><A HREF="function.readline-add-history.html" >readline_add_history</A > -- Adds a line to the history</DT ><DT ><A HREF="function.readline-clear-history.html" >readline_clear_history</A > -- Clears the history</DT ><DT ><A HREF="function.readline-completion-function.html" >readline_completion_function</A > -- Registers a completion function</DT ><DT ><A HREF="function.readline-info.html" >readline_info</A > -- Gets/sets various internal readline variables</DT ><DT ><A HREF="function.readline-list-history.html" >readline_list_history</A > -- Lists the history</DT ><DT ><A HREF="function.readline-read-history.html" >readline_read_history</A > -- Reads the history</DT ><DT ><A HREF="function.readline-write-history.html" >readline_write_history</A > -- Writes the history</DT ><DT ><A HREF="function.readline.html" >readline</A > -- Reads a line</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.pspell-suggest.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.readline-add-history.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >pspell_suggest</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >readline_add_history</TD ></TR ></TABLE ></DIV ></BODY ></HTML >