August 9th, 2000, 10:48 AM
hello guys.. i need some help about exec();
well i know that exec("ndc reload"); would perform that command.. but i want too print out on the page what the command tells
when i do like this:
[root@xermin cryzeck]# ndc reload
i want to print that Reload initiated. on the page.. how?
not just echo("reload initiated"); but the stuff the command tells.
August 9th, 2000, 11:29 AM
You can use any of the execution function to achieve this.
you can use passthru($command,$rc) . It executes a command and print raw output to screen. $rc is an optional argument which contains the return status.
Or the backticks operator :