本文整理汇总了PHP中_adodb_backtrace函数的典型用法代码示例。如果您正苦于以下问题:PHP _adodb_backtrace函数的具体用法?PHP _adodb_backtrace怎么用?PHP _adodb_backtrace使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_adodb_backtrace函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _adodb_debug_execute
function _adodb_debug_execute(&$zthis, $sql, $inputarr)
{
$ss = '';
if ($inputarr) {
foreach ($inputarr as $kk => $vv) {
if (is_string($vv) && strlen($vv) > 64) {
$vv = substr($vv, 0, 64) . '...';
}
if (is_null($vv)) {
$ss .= "({$kk}=>null) ";
} else {
$ss .= "({$kk}=>'{$vv}') ";
}
}
$ss = "[ {$ss} ]";
}
$sqlTxt = is_array($sql) ? $sql[0] : $sql;
/*str_replace(', ','##1#__^LF',is_array($sql) ? $sql[0] : $sql);
$sqlTxt = str_replace(',',', ',$sqlTxt);
$sqlTxt = str_replace('##1#__^LF', ', ' ,$sqlTxt);
*/
// check if running from browser or command-line
$inBrowser = isset($_SERVER['HTTP_USER_AGENT']);
$dbt = $zthis->databaseType;
if (isset($zthis->dsnType)) {
$dbt .= '-' . $zthis->dsnType;
}
if ($inBrowser) {
if ($ss) {
$ss = '<code>' . htmlspecialchars($ss) . '</code>';
}
if ($zthis->debug === -1) {
ADOConnection::outp("<br>\n({$dbt}): " . htmlspecialchars($sqlTxt) . " {$ss}\n<br>\n", false);
} else {
if ($zthis->debug !== -99) {
ADOConnection::outp("<hr>\n({$dbt}): " . htmlspecialchars($sqlTxt) . " {$ss}\n<hr>\n", false);
}
}
} else {
$ss = "\n " . $ss;
if ($zthis->debug !== -99) {
ADOConnection::outp("-----<hr>\n({$dbt}): " . $sqlTxt . " {$ss}\n-----<hr>\n", false);
}
}
$qID = $zthis->_query($sql, $inputarr);
/*
Alexios Fakios notes that ErrorMsg() must be called before ErrorNo() for mssql
because ErrorNo() calls Execute('SELECT @ERROR'), causing recursion
*/
if ($zthis->databaseType == 'mssql') {
// ErrorNo is a slow function call in mssql, and not reliable in PHP 4.0.6
if ($emsg = $zthis->ErrorMsg()) {
if ($err = $zthis->ErrorNo()) {
if ($zthis->debug === -99) {
ADOConnection::outp("<hr>\n({$dbt}): " . htmlspecialchars($sqlTxt) . " {$ss}\n<hr>\n", false);
}
ADOConnection::outp($err . ': ' . $emsg);
}
}
} else {
if (!$qID) {
if ($zthis->debug === -99) {
if ($inBrowser) {
ADOConnection::outp("<hr>\n({$dbt}): " . htmlspecialchars($sqlTxt) . " {$ss}\n<hr>\n", false);
} else {
ADOConnection::outp("-----<hr>\n({$dbt}): " . $sqlTxt . "{$ss}\n-----<hr>\n", false);
}
}
ADOConnection::outp($zthis->ErrorNo() . ': ' . $zthis->ErrorMsg());
}
}
if ($zthis->debug === 99) {
_adodb_backtrace(true, 9999, 2);
}
return $qID;
}
示例2: adodb_backtrace
function adodb_backtrace($printOrArr = true, $levels = 9999)
{
global $ADODB_INCLUDED_LIB;
if (empty($ADODB_INCLUDED_LIB)) {
include ADODB_DIR . '/adodb-lib.inc.php';
}
return _adodb_backtrace($printOrArr, $levels);
}
示例3: adodb_backtrace
function adodb_backtrace($printOrArr=true,$levels=9999,$ishtml=null)
{
global $ADODB_INCLUDED_LIB;
if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php');
return _adodb_backtrace($printOrArr,$levels,0,$ishtml);
}