在PHP中如何写入控制台? [英] How can I write to console in PHP?

查看:112
本文介绍了在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 /查询字符串以初始化调试过程。




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.

这篇关于在PHP中如何写入控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆