Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Redirecting standard output
- Jonathan Turkanis
November 16, 2005, 5:36 pm
rate this thread
I'm using PHP 5 with the command-line interface. I'd like to know if there is a
way to redirect calls to print and echo temporarily so that they go to an
Because I want to be able to control the redirection with the script, using
shell i/o redirection is not appropriate. I've discovered how to redirect calls
to fwrite(STDOUT, ...) using filter chains, but I'm hoping to provide a
user-level interface in which programmers can simply print instead of using
fwrite and cousins.
Any help would be greatly appreciated.