Reply to Redirecting standard output

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация