top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

PHP: Save the output from that process to a variable?

+3 votes
291 views

Say I have sent a command to a process using the fwrite command something like

...
while (true) {
 switch (expect_expectl($stream, $cases)) {
 case "ls":
 fwrite($stream, "ls -aln");
 break;
..

Is there a way I can save the output from that process to a variable ?

posted Aug 19, 2014 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+10 votes

I want to save a password in encrypted form, so that it will not be understand by human. Is it possible ? If yes then please explain briefly.

+1 vote

I am trying to pass a "PHP variable" from Apache (2.2.15) to Tomcat (7.0.27) but without success. The apache is used as front-end server of tomcat using mod_proxy_ajp.

I verified that I can pass only variable set by Apache (e.g. using SetEnv directive); How I can pass a variable set by PHP to Tomcat?

0 votes

PHP:: Suppose I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, whats the problem?

...