★ wanayoo — archive 1999 http://fr.php.net/manual/function.readline.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Readline
Quick Reference
English version of this pageGerman version of this pageJapanese version of this page
Italian version of this pageFrench version of this pageHungarian version of this page
Spanish version of this pageDutch version of this pageBrazilian Portuguese version of this page
Korean version of this pageCzech version of this page
Readline
* readline
* readline_add_history
* readline_clear_history
* readline_completion_function
* readline_info
* readline_list_history
* readline_read_history
* readline_write_history

  Thanks to:
 Chek.com
 easyDNS
 VA Linux Systems

  Related sites:
Apache
MySQL
PostgreSQL
Zend Tech.

  Community:
LinuxFund.org
OSDN
Manual: readline
View the source code for this pageSearch the site



Previous page
 Readline
 Updated
Mon, 08 Jan 2001
readline_add_history 
Next page


readline

(PHP 4 >= 4.0b4)

readline -- Reads a line

Description

string readline ([string prompt])

This function returns a single string from the user. You may specify a string with which to prompt the user. The line returned has the ending newline removed. You must add this line to the history yourself using readline_add_history().

Example 1. Readline()


//get 3 commands from user
for ($i=0; $i < 3; $i++) {
        $line = readline ("Command: ");
        readline_add_history ($line);
}

//dump history
print_r (readline_list_history());

//dump variables
print_r (readline_info());
     

 About Notes


Previous page
 Readline
 Updated
Mon, 08 Jan 2001
readline_add_history 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
France
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.