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

查看:139
本文介绍了如何在PHP中写入控制台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以写字符串或登录控制台?



我的意思



jsp,如果我们打印 system.out.println(some)它将在控制台不在页面。



在Firefox上,您可以使用扩展名 http://www.firephp.org/\"> FirePHP ,它支持将信息从PHP应用程序记录和转储到控制台。这是精彩的网络开发扩展 Firebug 的插件。





Chrome >

但是,如果您使用Chrome,则需要一个名为 webug 的PHP调试工具>或 Chrome Logger



最近Clockwork 正在积极开发中,通过添加一个新面板来提供有用的调试和分析信息来扩展开发工具。它为 Laravel 4 Slim 2 和支持可以通过其可扩展API添加。



使用Xdebug



更好的调试PHP的方法是通过< a href =http://xdebug.org/> 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天全站免登陆