PHP调试工具 - FirePHP安装与使用方法
生活随笔
收集整理的這篇文章主要介紹了
PHP调试工具 - FirePHP安装与使用方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、FirePHP 基本信息
1.1 基本介紹
FirePHP 可以將調試信息打印到瀏覽器的 FirePHP 控制臺。
1.2 相關網址
FirePHP 官網
GitHub - FirePHP
Google-Chrome - 插件網址
二、安裝 FirePHP
2.1 GoogleChrome 瀏覽器安裝 FirePHP 插件
這一步需要和諧操作。
2.2 composer 安裝 FirePHP
如果還未安裝 composer , 請先安裝 Composer。
點我查看 - Mac M1 安裝 Composer
點我查看 - 官方安裝 Composer 流程
# 在項目內安裝 FirePHP composer require firephp/firephp-core三、 實例代碼
<?phprequire('./vendor/autoload.php');$fire = FirePHP::init(); # $fire->log('要打印的內容', '標簽名');$message = ['Chon', 'Leslie', 'Sam'];$fire->log($message,'姓名'); $fire->info("Info Message!"); $fire->warn("Warn Message!"); $fire->error("Error Message!");# 分組顯示,默認效果為展開, Collapsed=>true 關閉展開效果 $fire->group('分組名', array('Collapsed'=>true)); $fire->log($message,'姓名'); $fire->info($message,'姓名'); $fire->groupEnd();總結
以上是生活随笔為你收集整理的PHP调试工具 - FirePHP安装与使用方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: POJ 2778
- 下一篇: CodeForces 799B (B)