如何设置 FirePHP 1.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');
?>
输出:
空
致命错误:在第 14 行 /home8/jayharri/public_html/if/doc_root/hello_firephp2.php 中的非对象上调用成员函数 console()
I love FirePHP and I've been using it for a while, but they've put out this massive upgrade and I'm completely flummoxed trying to get it to work. I think I'm copying the "Quick Start" code (kind of guessing at whatever changes are necessary for my server configuration), but for some reason, FirePHP's "primary" function, FirePHP::to()
isn't doing anything. Can anyone please help me figure out what I'm doing wrong? Thanks.
<?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');
?>
Output:
NULL
Fatal error: Call to a member function console() on a non-object in /home8/jayharri/public_html/if/doc_root/hello_firephp2.php on line 14
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查器变量在分配它时拼写错误,并且在获取包含路径时缺少括号。
请尝试以下操作:
另外,根据
INSIGHT_SERVER_PATH
常量,确保您的脚本安装了 FirePHP,位置为:The inspector variable is spelled wrong where you are assigning it and you are missing a bracket when getting the include path.
Try the following:
Also, according to the
INSIGHT_SERVER_PATH
constant make sure you have a script with FirePHP installed at: