<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >GNU Readline</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="Referência das Funções" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="rar_open" HREF="function.rar-open.html"><LINK REL="NEXT" TITLE="readline_add_history" HREF="function.readline-add-history.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" >Manual do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.rar-open.html" ACCESSKEY="P" >Anterior</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" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.readline" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >CXXXVI. GNU Readline</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN192276" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.intro" >Introdução</A ></H1 ><P > As funções <A HREF="function.readline.html" ><B CLASS="function" >readline()</B ></A > implementam uma interface para a biblioteca GNU Readline. Estas são funções que provem uma linha de comando editável. Um exeplo é o bash que permite a você usar as setas para inserir caracteres ou navegas no historico dos comandos. Por causa da naturesa interativa desta biblioteca, ela será de pouco uso para escrever aplicações web, mas será util quando você estiver escrevendo scripts que <A HREF="features.commandline.html" >usem o PHP a partir da linha de comando</A >. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Nota: </B >Esta extensão não está disponível na plataforma Windows.</P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.requirements" >Dependências</A ></H1 ><P > Para usar as funções readline, você precisa instalar a libreadline. Você pode encontrar a libreadline na página do projeto GNU Readline, em <A HREF="http://cnswww.cns.cwru.edu/~chet/readline/rltop.html" TARGET="_top" >http://cnswww.cns.cwru.edu/~chet/readline/rltop.html</A >. É mantida por Chet Ramey, que também é o autor do Bash. </P ><P > Você também pode utilizar estas funções com a biblioteca libedit, uma substituição não-GLP para a biblioteca readline. A biblioteca libedit esta sobre a licença BSD e esta disponível para download a partir de <A HREF="http://www.thrysoee.dk/editline/" TARGET="_top" >http://www.thrysoee.dk/editline/</A >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.installation" >Instalação</A ></H1 ><P > Para usar estas funções você deverá compilar as versões CGI ou CLI version do PHP com suporte readline. Você precisa configurar o PHP com <CODE CLASS="option" >--with-readline[=DIR]</CODE >. Para usar a substituiçao libedit readline, configure o PHP com <CODE CLASS="option" >--with-libedit[=DIR]</CODE >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.configuration" >Configurações em execução</A ></H1 ><P >Esta extensão não define nenhum parâmetro de configuração no <TT CLASS="filename" >php.ini</TT >.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.resources" >Tipos Resource</A ></H1 ><P >Esta extensão não possui nenhum tipo resource.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="readline.constants" >Constantes pré-definidas</A ></H1 ><P >Esta extensão não possui nenhuma constante.</P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Índice</B ></DT ><DT ><A HREF="function.readline-add-history.html" >readline_add_history</A > -- Adiciona uma linha ao histórico</DT ><DT ><A HREF="function.readline-callback-handler-install.html" >readline_callback_handler_install</A > -- Initializes the readline callback interface and terminal, prints the prompt and returns immediately</DT ><DT ><A HREF="function.readline-callback-handler-remove.html" >readline_callback_handler_remove</A > -- Removes a previously installed callback handler and restores terminal settings</DT ><DT ><A HREF="function.readline-callback-read-char.html" >readline_callback_read_char</A > -- Reads a character and informs the readline callback interface when a line is received</DT ><DT ><A HREF="function.readline-clear-history.html" >readline_clear_history</A > -- Limpa a história</DT ><DT ><A HREF="function.readline-completion-function.html" >readline_completion_function</A > -- Registra uma função de completar</DT ><DT ><A HREF="function.readline-info.html" >readline_info</A > -- Obtém/Define várias variáveis internas do readline</DT ><DT ><A HREF="function.readline-list-history.html" >readline_list_history</A > -- Lista a história</DT ><DT ><A HREF="function.readline-on-new-line.html" >readline_on_new_line</A > -- Inform readline that the cursor has moved to a new line</DT ><DT ><A HREF="function.readline-read-history.html" >readline_read_history</A > -- Lê a história</DT ><DT ><A HREF="function.readline-redisplay.html" >readline_redisplay</A > -- Redraws the display</DT ><DT ><A HREF="function.readline-write-history.html" >readline_write_history</A > -- Grava a história</DT ><DT ><A HREF="function.readline.html" >readline</A > -- Lê uma linha</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.rar-open.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.readline-add-history.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >rar_open</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >readline_add_history</TD ></TR ></TABLE ></DIV ></BODY ></HTML >