0

我喜欢 FirePHP,并且我已经使用了一段时间,但是他们已经推出了这个大规模的升级,我完全困惑于试图让它工作。我想我正在复制“快速启动”代码(有点猜测我的服务器配置需要进行任何更改),但由于某种原因,FirePHP 的“主要”功能FirePHP::to()没有做任何事情。谁能帮我弄清楚我做错了什么?谢谢。

<?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');

?>

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

4

1 回答 1

0

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

尝试以下操作:

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脚本:

http:://<hostname>/doc_root/hello_firephp2.php
于 2011-02-02T16:59:53.437 回答