Mailinglisten-Archive |
> Emilio Paolini wrote:
> > $FP= popen("cat", "r");
> :)) Raffiniert... PHP hat nämlich AFAIK kein Lesen/Schreiben von/auf
> die/der Standardein/ausgabe (uff... ;)
>
> Braucht es ja auch nicht, wenn man es schwerpunktmäßig als Präprozessor
> für HTML sieht.
> Allerdings finde ich es für einfache Shellskripte sehr praktisch, also
> wäre da doch mal wieder Entwicklungsbedarf ;-)
>
Hallo
Rasmus antwortete auf eine ähnliche Frage so:
> > i compiled php to use as cgi
> >and i want to read something from standard input, like in c or perl
> > it is poslible in php too? and if yes which variables or functions
> > is relevant to do this?
>
> $fp = fopen("/dev/stdin","r");
> And then just treat it like any other file.
> Or, if you don't have a/dev/stdin, try /dev/fd/0
>
Gruß Willi
--
Willi Kempter
SGL Carbon GmbH
86405 Meitingen
php::bar PHP Wiki - Listenarchive