You are here: Re: command line and get user input « PHP Language « IT news, forums, messages
Re: command line and get user input

Posted by Jean Pierre Daviau on 07/24/07 15:41

C:\Documents and Settings\Jean Pierre\Bureau>php -a
Interactive mode enabled

<?
$userInput = readline('Enter something here: ');

Fatal error: Call to undefined function readline() in
C:\Documents and Settings\
Jean Pierre\Bureau\- on line 2




"ZeldorBlat" <zeldorblat@gmail.com> a ιcrit dans le message de
news: 1185285651.829943.169160@w3g2000hsg.googlegroups.com...
> On Jul 24, 9:50 am, "Jean Pierre Daviau" <O...@WasEno.ugh>
> wrote:
>> Hi everybody,
>>
>> On command line is there a simple way to get user input? I am
>> not thinking of argc.
>> I red about the complicated to install Readline (GNU).
>>
>> I have found this in the manual wich does not work
>> -------------------------------------- Maybe this snippets
>> needs some tuning ----------------------------------
>>
>> // read tree entriesfor ($i=0; $i < 3; $i++) {
>> $line = readline("Commande : ");
>> readline_add_history($line);
>>
>> }
>>
>> // List
>> print_r(readline_list_history());
>>
>> // Liste les variables
>> print_r(readline_info());
>> --------------------------------------
>>
>> Thanks for your attention.
>>
>> Jean Pierre Daviau
>> --
>> windows Xp
>> asus p4 s533/333/133
>> Intel(R) Celeron (R) CPU 2.00 GHz
>> Processor Radeon7000 0x5159 agp
>
> Readline is what you want. And, no, it isn't complicated at
> all:
>
> $userInput = readline('Enter something here: ');
>
> That's it.
>

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация