首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何设置FirePHP 1.0版?

如何设置FirePHP 1.0版?
EN

Stack Overflow用户
提问于 2011-02-02 07:21:37
回答 1查看 436关注 0票数 0

我喜欢FirePHP,我已经使用它一段时间了,但他们已经推出了这个大规模的升级,我在尝试让它工作时完全被搞糊涂了。我想我是在复制“快速入门”代码(在某种程度上猜测服务器配置需要做什么更改),但是出于某些原因,FirePHP的“主要”函数FirePHP::to()什么也不做。有人能帮我找出我做错了什么吗?谢谢。

代码语言:javascript
运行
复制
<?php

define('INSIGHT_IPS', '*');
define('INSIGHT_AUTHKEYS', '290AA9215205F24E5104F48D61B60FFC');
define('INSIGHT_PATHS', __DIR__);
define('INSIGHT_SERVER_PATH', '/doc_root/hello_firephp2.php');

set_include_path(get_include_path . ":/home8/jayharri/php/FirePHP/lib");  // path to FirePHP library

require_once('FirePHP/Init.php');

$inpector = FirePHP::to('page');
var_dump($inspector);
$console = $inspector->console();
$console->log('hello firephp');

?>

输出:

致命错误:在第14行对/home8/jayharri/public_html/if/doc_root/hello_firephp2.php中的非对象调用成员函数console()

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-02-03 00:59:53

检查器变量的赋值位置拼写错误,并且在获取包含路径时缺少括号。

尝试以下操作:

代码语言:javascript
运行
复制
define('INSIGHT_IPS', '*');
define('INSIGHT_AUTHKEYS', '290AA9215205F24E5104F48D61B60FFC');
define('INSIGHT_PATHS', __DIR__);
define('INSIGHT_SERVER_PATH', '/doc_root/hello_firephp2.php');

set_include_path(get_include_path() . ":/home8/jayharri/php/FirePHP/lib");

require_once('FirePHP/Init.php');

$inspector = FirePHP::to('page');
$console = $inspector->console();
$console->log('hello firephp');

此外,根据INSIGHT_SERVER_PATH常量,请确保在以下位置安装了FirePHP的脚本:

代码语言:javascript
运行
复制
http:://<hostname>/doc_root/hello_firephp2.php
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4869133

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档