Reputation: 1913
How can I give STDIN to a php file from commandline directly ?
Currently I am doing like this : cat test.txt | php myfile.php
and test.txt contains a json object lie this:
{"Name":"XYZ","Age":"25"}
I want to give {"Name":"XYZ","Age":"25"} directly as STDIN with out involving a file, just copy pasting the contests to commandline.
Upvotes: 0
Views: 74