简体   繁体   English

如何查看或将php.exe的stdout重定向到文件?

[英]How to view or redirect php.exe's stdout to a file?

I modified the php source file, add some printfs and now I'd like to see the result, but php is loaded as module of apache httpd. 我修改了php源文件,添加了一些printfs,现在我想查看结果,但是php作为apache httpd的模块加载。 How could I view the result? 如何查看结果?

Thanks. 谢谢。

PS: I am working on Windows 7 + Apache. PS:我正在使用Windows 7 + Apache。

PHP usually writes to the Apache logs... did you check there? PHP通常会写入Apache日志...您检查过吗?

If it isn't writing there, see what log mechanism PHP's source uses and copy that because PHP writes to apache logs :) 如果不是在那儿写的,请查看PHP的源使用了什么日志机制,然后将其复制,因为PHP会写入Apache日志:)

PHP stdout come to browser. PHP stdout进入浏览器。 stderr comes to error log. stderr进入错误日志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM