[PHP-CLI] Accessing Input Lines from Functions Utilizing "-F"

php.internals

Larry Adams

22 years ago
Ok, So I am running PHP in interactive mode utilizing the PROCESS command line option -F. I type the following command: c:\php\php.exe -a -F myfile.php When I run this command, I receive the "Interactive Mode Enabled" prompt. My question is, once I start keying in information and the program "myfile.php" is called, how do I get to the information that I just typed in on STDIN? If I attempt to use fgets(STDIN,255);, it does not get the first command only my next one. If I attempt to use the $_SERVER[...] variables, I only get information on "myfile.php" and not the input line I typed in. Let me explain. C:\i>c:\php\php.exe -a -F myfile.php Interactive mode enabled test <cr> // my function myfile.php is now called. The question is how do I retreive the input line "test" from myfile.php???? Thanks in Advance, Larry Adams

Jan Lehnardt

22 years ago
Hi, On 26 Jun 2004, at 17:55, Larry Adams wrote:
> So I am running PHP in interactive mode utilizing the PROCESS command > line > option -F. I type the following command:
Try $GLOBALS['argn']. Jan
-- GPG Key: BB96 56B0 Q: Thank Jan? - A: http://geschenke.an.dasmoped.net/