当前位置: 首页>>代码示例>>PHP>>正文


PHP debug::debug方法代码示例

本文整理汇总了PHP中debug::debug方法的典型用法代码示例。如果您正苦于以下问题:PHP debug::debug方法的具体用法?PHP debug::debug怎么用?PHP debug::debug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在debug的用法示例。


在下文中一共展示了debug::debug方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 /**
  * Initialize debug
  *
  * @param array $options
  */
 public static function init($options)
 {
     self::$debug = !empty($options['debug']) ? true : false;
     if (self::$debug) {
         self::$email = !empty($options['email']) ? $options['email'] : null;
         self::$toolbar = !empty($options['toolbar']) ? true : false;
         self::benchmark('application start');
     }
 }
开发者ID:volodymyr-volynets,项目名称:framework,代码行数:14,代码来源:debug.php

示例2: array

$timeoutSql = $db->q("SELECT deviceConnectionTimout FROM settings");
$result = mysql_fetch_assoc($timeoutSql);
$timeout = $result['deviceConnectionTimout'];
// Get active nodes for a given task ID
// Query to retrieve row for given ID (tidxxxxxx is stored in nodes and is generated when task is created)
$getNodesSql = "SELECT \n\t\t\t\t\t\t\t\t\t\tid, \n\t\t\t\t\t\t\t\t\t\tdeviceName, \n\t\t\t\t\t\t\t\t\t\tdeviceIpAddr, \n\t\t\t\t\t\t\t\t\t\tdevicePrompt, \n\t\t\t\t\t\t\t\t\t\tdeviceUsername, \n\t\t\t\t\t\t\t\t\t\tdevicePassword, \n\t\t\t\t\t\t\t\t\t\tdeviceEnableMode, \n\t\t\t\t\t\t\t\t\t\tdeviceEnablePassword, \n\t\t\t\t\t\t\t\t\t\tnodeCatId, \n\t\t\t\t\t\t\t\t\t\tdeviceAccessMethodId, \n\t\t\t\t\t\t\t\t\t\tconnPort \n\t\t\t\t\t\t\t\t\t\tFROM nodes WHERE taskId" . $tid . " = 1 AND status = 1";
if ($result = $db->q($getNodesSql)) {
    // push rows to $devices array
    $devices = array();
    while ($row = mysql_fetch_assoc($result)) {
        array_push($devices, $row);
    }
    foreach ($devices as $device) {
        // debugging check and action
        if ($debugOnOff === '1' || isset($cliDebugOutput)) {
            $debug->debug($device);
        }
        // ok, verification of host reachability based on fsockopen to host port i.e. 22 or 23. If fails, continue to next foreach iteration
        $status = getHostStatus($device['deviceIpAddr'], $device['connPort']);
        // getHostStatus() from functions.php
        if ($status === "<font color=red>Unavailable</font>") {
            $text = "Failure: Unable to connect to " . $device['deviceName'] . " - " . $device['deviceIpAddr'] . " when running taskID " . $tid;
            $report->eachData($device['deviceName'], $connStatusFail, $text);
            // log to report
            echo $text . " - getHostStatus() Error:(File: " . $_SERVER['PHP_SELF'] . ")\n";
            // log to console
            $log->Conn($text . " - getHostStatus() Error:(File: " . $_SERVER['PHP_SELF'] . ")");
            // logg to file
            continue;
        }
        // get command list for device. This is based on the catId. i.e. catId->cmdId->CmdName->Node
开发者ID:3tan,项目名称:rconfig,代码行数:31,代码来源:showCmdScript.php

示例3: stop

 public static function stop()
 {
     self::$debug = false;
 }
开发者ID:kelubo,项目名称:OpenQRM,代码行数:4,代码来源:htmlobject.debug.class.php

示例4:

 function debug_mock()
 {
     parent::debug();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:4,代码来源:debug_mock.class.php

示例5: while

 while ($row = mysql_fetch_assoc($result)) {
     array_push($devices, $row);
 }
 // get the config snippet data from the DB
 $cmdsSql = $db->q("SELECT * FROM snippets WHERE id = " . $snipId);
 $result = mysql_fetch_assoc($cmdsSql);
 $snippet = $result['snippet'];
 $snippetArr = explode("\n", $snippet);
 // explode text new lines to array
 $snippetArr = array_map('trim', $snippetArr);
 // trim whitespace from each array value
 $tableRow = "";
 foreach ($devices as $device) {
     // debugging check and action
     if ($debugOnOff === '1' || isset($cliDebugOutput)) {
         $debug->debug($device);
     }
     // ok, verification of host reachability based on fsockopen to host port i.e. 22 or 23. If fails, continue to next foreach iteration
     $status = getHostStatus($device['deviceIpAddr'], $device['connPort']);
     // getHostStatus() from functions.php
     if ($status === "<font color=red>Unavailable</font>") {
         $text = "Failure: Unable to connect to " . $device['deviceName'] . " - " . $device['deviceIpAddr'] . " when running taskID " . $tid;
         $report->eachComplianceDataRowDeviceName($device['deviceName'], $connStatusFail, $text);
         // log to report
         echo $text . " - getHostStatus() Error:(File: " . $_SERVER['PHP_SELF'] . ")\n";
         // log to console
         $log->Conn($text . " - getHostStatus() Error:(File: " . $_SERVER['PHP_SELF'] . ")");
         // logg to file
         continue;
     }
     // get the category for the device
开发者ID:3tan,项目名称:rconfig,代码行数:31,代码来源:configDeployScript.php


注:本文中的debug::debug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。