php - How can I pipe input to a process? -



php - How can I pipe input to a process? -

i trying run programme using php , maintain sending output it. i've tried using exec() documentation page says, hangs, waiting process return.

is there exec() allow me maintain sending commands cli application?

please note since application closed-source, don't have alternative of changing application lock file or other thing suggested answers similar questions.

you looking proc_open command. command runs process connecting standard input , output file descriptors opened pipes in program. write 0 descriptor taken input on stdin process, , outputs can read programme of file. illustration code in linked php documentation should going.

however, if trying communicate mysql specifically, rather utilize built in mysql functionality of php

php

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -