Friday, 15 May 2015

How to reopen STDOUT to screen in PHP? -



How to reopen STDOUT to screen in PHP? -

i‘ve redirected stdout file in php. want reopen stdout , display output on screen. code next doesn't work. how it? thanks!

<?php fclose(stdout); $stdout = fopen('file_stdout', 'w'); print 'aaaaaa'; //fclose(stdout); $stdout = fopen('/dev/stdout', 'w'); print 'vvvvvv';

open /dev/tty (or appropriate device file os) instead. /dev/stdout points fd1, you've closed.

php stdout io-redirection

No comments:

Post a Comment