dnl
dnl

Reputation: 365

Run php script on CLI with interactive output

When I run my PHP script on my local windows machine, I see the output of printf every time it is called.

But running on a remote CentOS 6 machine using php index.php -x does not show any output until it has finished execution. How can I enable printf to write sth to the output stream every time it is called, so I can see what my script is actually doing?

Upvotes: 1

Views: 194

Answers (1)

dnl
dnl

Reputation: 365

Just had to use fwrite(STDOUT, "text") instead of printf as noted here

Upvotes: 1

Related Questions