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

- Thread: https://externals.io/message/10786
- Original archive: https://news-web.php.net/php.internals/10786
- Started by Larry Adams on 2004-06-26T15:55:23+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #10786 — Larry Adams — 2004-06-26T15:55:23+00:00

URL: https://externals.io/message/10786#10786

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

---

## #10908 — Jan Lehnardt — 2004-07-05T11:13:35+00:00

URL: https://externals.io/message/10786#10908 · In reply to: #10786

Hi,

> 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/
