|  | Posted by Jonathan Turkanis on 11/16/05 19:36 
Hi,
 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
 arbitrary stream.
 
 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.
 
 --
 Jonathan Turkanis
 www.cpp-cookbook.com
 www.kangaroologic.com
  Navigation: [Reply to this message] |