I have a script that runs the system() function. I can get the executed command's output in a string that system() returns, which is what I want. But when system() runs I also get the same text on the screen. I'd like to have it only in the string and not see it on the screen. Is there a way to do that? I tried redirecting to /dev/null but that returns empty strings also.
thanks,
William
system() function question
Moderator: General Moderators
- Jaxolotl
- Forum Contributor
- Posts: 137
- Joined: Mon Nov 13, 2006 4:19 am
- Location: Argentina and Italy
Re: system() function question
From the manual http://php.net/manual/en/function.system.php
The system() call also tries to automatically flush the web server's output buffer after each line of output if PHP is running as a server module.
Is it the problem?
The system() call also tries to automatically flush the web server's output buffer after each line of output if PHP is running as a server module.
Is it the problem?