在PHP中如何写入控制台? [英] How can I write to console in PHP?
问题描述
我的意思是
就像在jsp,如果我们打印像 system.out.println(some)
它将在控制台不在页面。
Firefox
在Firefox上,您可以使用一个扩展名为 FirePHP ,它可以将信息从PHP应用程序记录并转储到控制台。这是一个令人敬畏的Web开发扩展 Firebug 的插件。
Chrome
但是,如果您使用Chrome,则会有一个名为 webug 或 Chrome Logger 。
最近更新的发条机构正在积极发展,开发人员工具通过添加一个新的面板来提供有用的调试和分析信息。它提供即时支持 Laravel 4 和 Slim 2 和支持可以通过其可扩展API添加。
使用Xdebug
调试PHP的更好方法是通过<一个href =http://xdebug.org/ =noreferrer> Xdebug 。大多数浏览器提供帮助扩展,以帮助您传递所需的cookie /查询字符串以初始化调试过程。
- Chrome - Xdebug Helper
- Firefox - 最简单的Xdebug
- Opera - Xdebug
- Safari - Xdebug Toggler
Is it possible write string or log into the console?
What I mean
Just like in jsp, if we print something like system.out.println("some")
it will be there at console not at page.
Firefox
On Firefox you can use an extension called FirePHP which enables the logging and dumping of information from your PHP applications to the console. This is an addon to the awesome web development extension Firebug.
Chrome
However if you are using Chrome there is a PHP debugging tool called webug or Chrome Logger.
More recently Clockwork is in active development which extends the Developer Tools by adding a new panel to provide useful debugging and profiling information. It provides out of the box support for Laravel 4 and Slim 2 and support can be added via its extensible API.
Using Xdebug
A better way to debug your PHP would be via Xdebug. Most browsers provide helper extensions to help you pass the required cookie/query string to initialize the debugging process.
- Chrome - Xdebug Helper
- Firefox - The easiest Xdebug
- Opera - Xdebug
- Safari - Xdebug Toggler
这篇关于在PHP中如何写入控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!