I have two php cli scripts. The first one pipes data into the second one. I want the second one to prompt the user for a confirmation. Is this possible?
I'm using wordpress' php-cli-tools, but my problem seem to be applicable to php in general, from what I see with my basic tests. (i.e. fgets(), readline, etc )
I can never get the prompt to work, since it looks like it will always read an EOT character from the previous input, even if I've already read it...
Then, later, when I prompt by using fwrite for output and then fgets() for input, nothing happens. Program is just waiting for something to happen... Not sure what... If I use the library I get the error 'Caught ^D during input'. No luck with readline either...
Has anyone ever done this before?
Thank you so much!