本文整理汇总了PHP中FB::dump方法的典型用法代码示例。如果您正苦于以下问题:PHP FB::dump方法的具体用法?PHP FB::dump怎么用?PHP FB::dump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FB
的用法示例。
在下文中一共展示了FB::dump方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dump
/**
* Dumps key and variable to firebug server panel
*
* @see FirePHP::DUMP
* @param mixed $var
* @param string $key
* @return true
* @throws Exception
*/
public static function dump($var, $key = 'label')
{
return parent::dump($key, $var);
}
示例2: fb
function fb()
{
if (empty($_SESSION['adwhirl_debug'])) {
return;
}
global $global_fb_count;
global $lastTime;
$args = func_get_args();
$global_fb_count++;
if (count($args) == 2) {
if (is_string($args[0])) {
$s = $args[0];
$v = $args[1];
} else {
$s = $args[1];
$v = $args[0];
}
$msg = $s . "<br/>";
} else {
$v = $args[0];
$s = "";
FB::dump("", $args[0]);
$msg = "Dumping an object <br/>";
}
$curTime = microtime(true);
$ms = $curTime - $lastTime;
$lastTime = $curTime;
$s = "{$global_fb_count} - {$ms}: {$s}";
// echo "$s<br>";
$msg = "{$global_fb_count}: {$msg}";
// echo $msg;
FB::dump($s, $v);
}
示例3: dump
/**
* {@inheritdoc}
*/
public function dump($input, $name = NULL)
{
$fb = new \FB();
$fb->dump($name, $input);
}
示例4: array
<?php
FB::group('Test Group');
FB::send('Hello World');
FB::groupEnd();
FB::log('Log Message');
FB::info('Info Message');
FB::warn('Info Message');
FB::error('Info Message');
FB::trace('Trace to here');
FB::send('Trace to here', FirePHP::TRACE);
FB::table('2 SQL queries took 0.06 seconds', array(array('SQL Statement', 'Time', 'Result'), array('SELECT * FROM Foo', '0.02', array('row1', 'row2')), array('SELECT * FROM Bar', '0.04', array('row1', 'row2'))));
FB::dump('PHP Version', phpversion());
示例5: fb
<?php
require_once 'FirePHP/fb.php';
FB::setLogToInsightConsole('Firebug');
fb('Log message');
FB::log('Log message');
FB::log('Log message', 'Label');
FB::info('Info message');
FB::warn('Warn message');
FB::error('Error message');
FB::dump('key', 'value');
FB::trace('Trace to here');
try {
throw new Exception('Test exception');
} catch (Exception $e) {
FB::error($e);
}
FB::table('2 SQL queries took 0.06 seconds', array(array('SQL Statement', 'Time', 'Result'), array('SELECT * FROM Foo', '0.02', array('row1', 'row2')), array('SELECT * FROM Bar', '0.04', array('row1', 'row2'))));
FB::group('Group 1');
FB::log('Test message 1');
FB::group('Group 2');
FB::log('Test message 2');
FB::groupEnd();
FB::log('Test message 3');
FB::groupEnd();
示例6: array
<?php
FB::group('Test Group');
FB::send('Hello World');
FB::groupEnd();
FB::log('Log Message');
FB::info('Info Message');
FB::warn('Info Message');
FB::error('Info Message');
FB::trace('Trace to here');
FB::send('Trace to here', FirePHP::TRACE);
FB::table('2 SQL queries took 0.06 seconds', array(array('SQL Statement', 'Time', 'Result'), array('SELECT * FROM Foo', '0.02', array('row1', 'row2')), array('SELECT * FROM Bar', '0.04', array('row1', 'row2'))));
FB::dump('RequestHeaders', apache_request_headers());
示例7: trigger_error
trigger_error("Database Connection Error: " . $e->getMessage());
echo "Database Connection Error. Reload the page to try again.";
exit;
}
/*| template engine |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|*/
Session::init($cfg['guid']);
TemplateEngine::init($cfg['dwoo_template_directory'], $cfg['dwoo_compiled_directory'], $cfg['dwoo_cache_directory']);
/*| magic quotes |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|*/
if (get_magic_quotes_gpc()) {
function stripslashes_recurse($value)
{
$value = is_array($value) ? array_map('stripslashes_recurse', $value) : stripslashes($value);
return $value;
}
$_GET = array_map('stripslashes_recurse', $_GET);
$_POST = array_map('stripslashes_recurse', $_POST);
$_COOKIE = array_map('stripslashes_recurse', $_COOKIE);
}
/*| debug |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|*/
if ($cfg['debug']) {
if (trim($cfg['firephp_path']) != '') {
require_once $cfg['firephp_path'];
// dump some common used info to firephp
FB::dump('Get', $_GET);
FB::dump('Post', $_POST);
FB::dump('Cookie', $_COOKIE);
if (isset($_SESSION)) {
FB::dump('Session', $_SESSION);
}
}
}