Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
777 views
in Technique[技术] by (71.8m points)

stream - How can I read the contents of stdin (up until EOF) into a string in PHP?

How can I read the contents of stdin (up until EOF) into a string in PHP?

question from:https://stackoverflow.com/questions/823494/how-can-i-read-the-contents-of-stdin-up-until-eof-into-a-string-in-php

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

ended up figuring it out myself:

$input_data = file_get_contents("php://stdin");

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...