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


PHP show_debug函数代码示例

本文整理汇总了PHP中show_debug函数的典型用法代码示例。如果您正苦于以下问题:PHP show_debug函数的具体用法?PHP show_debug怎么用?PHP show_debug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: end_script_combat

function end_script_combat($name = 0)
{
    global $_SERVER;
    show_debug($name);
    mysql_close();
    if (function_exists("save_debug")) {
        save_debug();
    }
}
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:9,代码来源:combat.php

示例2: show_debug

	</table>
	</td>
	<td valign="bottom">    
		<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
			<tr> 
				<td>&nbsp;</td>
			</tr>
		</table>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr> 
				<td background="' . $img . '/img/bot-back.gif">
				<div style="width:100%" align="center"><img src="' . $img . '/img/bot-mid.gif" width="352" height="70"></div>
				</td>
			</tr>
		</table>
	</td>
</tr>
</table>
<center>';
include "../lib/banners.php";
echo '
</center>
</body>

</html>';
if ($_SERVER['REMOTE_ADDR'] == debug_ip) {
    show_debug();
}
if (function_exists("save_debug")) {
    save_debug();
}
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:index.php

示例3: check_snom_firmware

function check_snom_firmware($agent, $phone_type)
{
    global $debug, $mac;
    global $debug;
    $debug[] = array(level => 'v', status => 'info', file => __FILE__ . ":" . __LINE__, log => " {$agent}, {$mac}, {$phone_type}");
    switch ($phone_type) {
        case "snom300":
            if (stristr($agent, "8.7.5.13") == false) {
                $firmware_status = "http://" . $_SERVER['HTTP_HOST'] . "/prov/snom/firmware/firmware.php?mac=" . $mac;
                echo "<html lang=\"en\">\n";
                echo "<pre>\n";
                echo "update_policy\$: auto_update\n";
                echo "pnp_config\$: off\n";
                echo "firmware_status: " . $firmware_status . "\n";
                echo "</pre>\n";
                echo "</html>\n";
                show_debug();
                exit;
            }
            break;
        case "snom320":
        case "snom360":
        case "snom370":
            if (stristr($agent, "8.7.3.25") == false) {
                $firmware_status = "http://" . $_SERVER['HTTP_HOST'] . "/prov/snom/firmware/firmware.php?mac=" . $mac;
                echo "<html lang=\"en\">\n";
                echo "<pre>\n";
                echo "update_policy\$: auto_update\n";
                echo "pnp_config\$: off\n";
                echo "firmware_status: " . $firmware_status . "\n";
                echo "</pre>\n";
                echo "</html>\n";
                show_debug();
                exit;
            }
            break;
        case "snom720":
            if (stristr($agent, "8.7.5.13") == false) {
                $firmware_status = "http://" . $_SERVER['HTTP_HOST'] . "/prov/snom/firmware/firmware.php?mac=" . $mac;
                echo "<html lang=\"en\">\n";
                echo "<pre>\n";
                echo "update_policy\$: auto_update\n";
                echo "pnp_config\$: off\n";
                echo "firmware_status: " . $firmware_status . "\n";
                echo "</pre>\n";
                echo "</html>\n";
                show_debug();
                exit;
            }
            break;
        case "snom760":
            if (stristr($agent, "8.7.5.13") == false) {
                $firmware_status = "http://" . $_SERVER['HTTP_HOST'] . "/prov/snom/firmware/firmware.php?mac=" . $mac;
                echo "<html lang=\"en\">\n";
                echo "<pre>\n";
                echo "update_policy\$: auto_update\n";
                echo "pnp_config\$: off\n";
                echo "firmware_status: " . $firmware_status . "\n";
                echo "</pre>\n";
                echo "</html>\n";
                show_debug();
                exit;
            }
            break;
        case "snom820":
            if (stristr($agent, "8.7.3.25") == false) {
                $firmware_status = "http://" . $_SERVER['HTTP_HOST'] . "/prov/snom/firmware/firmware.php?mac=" . $mac;
                echo "<html lang=\"en\">\n";
                echo "<pre>\n";
                echo "update_policy\$: auto_update\n";
                echo "pnp_config\$: off\n";
                echo "firmware_status: " . $firmware_status . "\n";
                echo "</pre>\n";
                echo "</html>\n";
                show_debug();
                exit;
            }
            break;
        case "snom870":
            if (stristr($agent, "8.7.3.25") == false) {
                $firmware_status = "http://" . $_SERVER['HTTP_HOST'] . "/prov/snom/firmware/firmware.php?mac=" . $mac;
                echo "<html lang=\"en\">\n";
                echo "<pre>\n";
                echo "update_policy\$: auto_update\n";
                echo "pnp_config\$: off\n";
                echo "firmware_status: " . $firmware_status . "\n";
                echo "</pre>\n";
                echo "</html>\n";
                show_debug();
                exit;
            }
            break;
        case "snomMP":
            if (stristr($agent, "8.7.3.25") == false) {
                $firmware_status = "http://" . $_SERVER['HTTP_HOST'] . "/prov/snom/firmware/firmware.php?mac=" . $mac;
                echo "<html lang=\"en\">\n";
                echo "<pre>\n";
                echo "update_policy\$: auto_update\n";
                echo "pnp_config\$: off\n";
                echo "firmware_status: " . $firmware_status . "\n";
//.........这里部分代码省略.........
开发者ID:bhepp,项目名称:kazoo-provision,代码行数:101,代码来源:functions_snom.php

示例4: myquery

    }
    echo '[<a href="../act.php">Выйти&nbsp;из&nbsp;города</a>]';
    echo '</td>
		</tr>
		</table>';
    if (!isset($_GET['option'])) {
        $option = 0;
    } else {
        $option = (int) $_GET['option'];
    }
    $check = myquery("SELECT * FROM game_gorod_set_option WHERE gorod_id={$town} AND option_id={$option}");
    if (mysql_num_rows($check) > 0) {
        list($file) = mysql_fetch_array(myquery("SELECT link FROM game_gorod_option WHERE id={$option}"));
        /* Variables to use:
        			$town - town id;
        			$clan - owner clan;
        			$rustown
        			.......
        		 */
        include '../inc/gorod/' . $file;
    }
    echo '
		</td>
	</tr>
	</table>';
    echo '</body></html>';
}
show_debug($char['name']);
if (function_exists("save_debug")) {
    save_debug();
}
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:31,代码来源:town.php

示例5: get_post

 /**
  * Retrieve a post.
  *
  * @uses get_post()
  * @param int $id Post ID
  * @param string $context The context; 'view' (default) or 'edit'.
  * @return array Post entity
  */
 public function get_post($id, $context = 'view', $is_featured_image = false)
 {
     $id = (int) $id;
     $post = get_post($id, ARRAY_A);
     show_debug($post, __FILE__, __LINE__);
     if (empty($id) || empty($post['ID'])) {
         json_error(BigAppErr::$post['code'], "get post faild!", $id);
     }
     $checked_permission = 'read';
     $checked_post = $post;
     if ('inherit' === $post['post_status'] && $post['post_parent'] > 0) {
         $_temp_post = get_post($post['post_parent'], ARRAY_A);
         show_debug($_temp_post, __FILE__, __LINE__);
         if ($post['post_type'] != 'attachment') {
             //fix for 特色图关联的文章被删的情况
             $checked_post = $_temp_post;
             if ('revision' === $post['post_type']) {
                 $checked_permission = 'edit';
             }
         }
     }
     if (!json_check_post_permission($checked_post, $checked_permission)) {
         json_error(BigAppErr::$post['code'], BigAppErr::$post['msg'], "cant read this post.", $id);
     }
     $response = new WP_JSON_Response();
     $data = $this->prepare_post($post, $context);
     if ($data == false) {
         json_error(BigAppErr::$post['code'], "prepare post faild.", $id);
     }
     $favorite_model = new WP_JSON_Favorite($this->server);
     $data['is_favorited'] = $favorite_model->check_favorited($id);
     //true/false    是否收藏标示
     $post_views = new WP_JSON_PostViews($this->server);
     $post_views->process_postviews($id);
     //记录浏览量
     if ($is_featured_image == true) {
         $response->set_data(array($data));
         //如果是特征图,返回数据,为了兼容多图模式
     } else {
         $response->set_data($data);
         //非特征图修改为非数组格式,用于前端缓存及兼容.
     }
     return $response;
 }
开发者ID:Mushan3420,项目名称:BigApp-PHP7,代码行数:52,代码来源:class-wp-json-posts.php

示例6: verify_form_token

function verify_form_token()
{
    $form_id = $_REQUEST['scms_form_id'];
    $token = $_REQUEST['scms_form_token'];
    if (isset($_SESSION['scms_form_tokens'][$form_id]) && $_SESSION['scms_form_tokens'][$form_id] == $token) {
        return true;
    }
    new Log(array('type' => 'ERROR', 'message' => 'Form tokens do not match! form ID: ' . $form_id));
    exit;
}
###################################
# Error reporting is always "7"
error_reporting(7);
ini_set('display_errors', 0);
// hide all errors from screen
if ($debug && show_debug()) {
    ini_set('display_errors', 1);
    # exception: dont show errors during full installation procedure
    if ($is_installation_script) {
        ini_set('display_errors', 0);
    }
}
/**
* saurusErrorHandler
*
* parses php-errors and saves them into DataBase, if parameter save_error_log=1 in config table
*
* @package CMS
*
* @param - all params are set by defaults
*/
开发者ID:ragulka,项目名称:Saurus-CMS-Community-Edition,代码行数:31,代码来源:port.inc.php

示例7: print_msg

 function print_msg()
 {
     if (show_debug()) {
         print $this->get_msg();
     }
 }
开发者ID:sauruscms,项目名称:Saurus-CMS-Community-Edition,代码行数:6,代码来源:debug.inc.php

示例8: get_dbhost

function get_dbhost($hosts)
{
    global $testsleep;
    while ($host == false) {
        foreach (explode(" ", $hosts) as $testhost) {
            $host = check_couchdb($testhost);
            if ($host) {
                break;
            }
        }
        if ($host) {
            continue;
        }
        show_debug("No connect to cluster-db sleep now for next tray in (s):" . $testsleep);
        sleep($testsleep);
    }
    return $host;
}
开发者ID:gk1,项目名称:kazoo-provision,代码行数:18,代码来源:functions.php

示例9: display_bigapp_admin_extend_page

    /**
     * 推广页区的管理页面
     */
    public static function display_bigapp_admin_extend_page()
    {
        $js_data = BigAppAdminModel::get_extend_conf();
        $page_data['plugin_path'] = get_plugin_site_base() . '/admin';
        $page_data['imgUrl'] = get_bloginfo('siteurl') . "/?yz_app=1&api_route=admin_api&action=upload_img&key=" . urlencode('mobile_app_image_s');
        show_debug($page_data, __FILE__, __LINE__);
        echo_output(loadTemplate('admin_extend.tpl', $js_data, $page_data));
        ?>
		<?php 
    }
开发者ID:Mushan3420,项目名称:BigApp-PHP7,代码行数:13,代码来源:bigapp-admin.class.php

示例10: PrintFooter

    function PrintFooter()
    {
        global $MyTimer, $numsql, $time_myquery;
        if (!$this->guest) {
            if ($this->char['clan_id'] == 1) {
                $exec_time = $MyTimer->GetTime(5);
                echo '<div class="debug">Время вып.скрипта: <span class="style2">' . $exec_time . '</span> сек   |   Количество запросов: <span class="style2">' . $numsql . '</span>   |   Время запросов: <span class="style2">' . $time_myquery . '</span> сек (' . round($time_myquery * 100 / $exec_time, 2) . '%)</div>';
            }
        }
        if ($_SERVER['REMOTE_ADDR'] == debug_ip) {
            show_debug();
        }
        ?>
		</body>
		</html>
		<?php 
    }
开发者ID:themiddleearth,项目名称:RPG.SU,代码行数:17,代码来源:forum.class.php

示例11: initialize

 /**
  * Initialize session driver object
  *
  * @return	void
  */
 protected function initialize()
 {
     // Set all the session preferences, which can either be set
     // manually via the $params array or via the config file
     $prefs = array('sess_encrypt_cookie', 'sess_use_database', 'sess_table_name', 'sess_expiration', 'sess_expire_on_close', 'sess_match_ip', 'sess_match_useragent', 'sess_cookie_name', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'sess_time_to_update', 'time_reference', 'cookie_prefix', 'encryption_key');
     $this->_standardize_newlines = (bool) config_item('standardize_newlines');
     foreach ($prefs as $key) {
         $this->{$key} = isset($this->_parent->params[$key]) ? $this->_parent->params[$key] : $this->CI->config->item($key);
     }
     if (empty($this->encryption_key)) {
         show_debug('In order to use the Cookie Session driver you are required to set an encryption key in your config file.');
     }
     // Do we need encryption? If so, load the encryption class
     if ($this->sess_encrypt_cookie === TRUE) {
         $this->CI->load->library('encryption');
     }
     // Check for database
     if ($this->sess_use_database === TRUE && $this->sess_table_name !== '') {
         // Load database driver
         $this->CI->load->database();
         // Register shutdown function
         register_shutdown_function(array($this, '_update_db'));
     }
     // Set the "now" time. Can either be GMT or server time, based on the config prefs.
     // We use this to set the "last activity" time
     $this->now = $this->_get_time();
     // Set the session length. If the session expiration is
     // set to zero we'll set the expiration two years from now.
     if ($this->sess_expiration === 0) {
         $this->sess_expiration = 60 * 60 * 24 * 365 * 2;
     }
     // Set the cookie name
     $this->sess_cookie_name = $this->cookie_prefix . $this->sess_cookie_name;
     // Run the Session routine. If a session doesn't exist we'll
     // create a new one. If it does, we'll update it.
     if (!$this->_sess_read()) {
         $this->_sess_create();
     } else {
         $this->_sess_update();
     }
     // Delete expired sessions if necessary
     $this->_sess_gc();
 }
开发者ID:surgeon-xie,项目名称:jxseo,代码行数:48,代码来源:Session_cookie.php

示例12: json_check_post_permission

/**
 * Check if we have permission to interact with the post object.
 *
 * @param WP_Post $post Post object.
 * @param string $capability Permission to check.
 * @return boolean Can we interact with it?
 */
function json_check_post_permission($post, $capability = 'read')
{
    $permission = false;
    $post_type = get_post_type_object($post['post_type']);
    switch ($capability) {
        case 'read':
            if (!$post_type->show_in_json) {
                show_debug("post_type not show_in_json:post_id:" . $post['ID'] . " post_type:" . $post['post_type'], __FILE__, __LINE__);
                return false;
            }
            if ('publish' === $post['post_status'] || current_user_can($post_type->cap->read_post, $post['ID'])) {
                $permission = true;
            }
            // Can we read the parent if we're inheriting?
            if ('inherit' === $post['post_status'] && $post['post_parent'] > 0) {
                $parent = get_post($post['post_parent'], ARRAY_A);
                show_debug($parent, __FILE__, __LINE__);
                if (json_check_post_permission($parent, 'read')) {
                    $permission = true;
                }
            }
            // If we don't have a parent, but the status is set to inherit, assume
            // it's published (as per get_post_status())
            if ('inherit' === $post['post_status']) {
                $permission = true;
            }
            show_debug("post_permisson:" . $permission . " post_id:" . $post['ID'] . " post_type:" . $post['post_type'] . " post_status:" . $post['post_status'], __FILE__, __LINE__);
            break;
        case 'edit':
            if (current_user_can($post_type->cap->edit_post, $post['ID'])) {
                $permission = true;
            }
            break;
        case 'create':
            if (current_user_can($post_type->cap->create_posts) || current_user_can($post_type->cap->edit_posts)) {
                $permission = true;
            }
            break;
        case 'delete':
            if (current_user_can($post_type->cap->delete_post, $post['ID'])) {
                $permission = true;
            }
            break;
        default:
            if (current_user_can($post_type->cap->{$capability})) {
                $permission = true;
            }
    }
    return apply_filters("json_check_post_{$capability}_permission", $permission, $post);
}
开发者ID:Mushan3420,项目名称:BigApp-PHP7,代码行数:57,代码来源:util.inc.php

示例13: debug_screen

function debug_screen()
{
    global $debug_log_array, $debug_warning_array, $debug_notice_array, $debug_unknow_array, $debug_sql_array, $debug_sql_error, $_path, $Account_Data, $Stats_Data, $installing, $active_debug;
    if ($installing || verif_access("Admin", true) && $active_debug) {
        $html = "";
        $corrig_path = str_replace("/", '\\', $_path);
        if (!empty($debug_log_array)) {
            $content = "";
            $content .= "<table border='1'>";
            if (isset($debug_log_array)) {
                foreach ($debug_log_array as $x => $req) {
                    foreach ($req['trace'] as $n => $t) {
                        if ($n != 0 && $t['function'] !== 'debug_log') {
                            $content .= "<tr>";
                            if ($n == 1) {
                                $content .= "<th rowspan='" . (count($req['trace']) - 1) . "'>{$x}</th><td rowspan='" . (count($req['trace']) - 1) . "' >" . $req['message'] . "</td>";
                            }
                            $content .= "<td>" . (isset($t['file']) ? str_replace($corrig_path, "", $t['file']) : "") . "</td>\n\t\t\t\t\t\t\t\t<td>" . (isset($t['line']) ? $t['line'] : '') . "</td>\n\t\t\t\t\t\t\t\t<td>" . $t['function'] . "</td>\n\t\t\t\t\t\t\t\t<td>" . print_r($t['args'], 1) . "</td>";
                            $content .= "</tr>";
                        }
                    }
                }
            }
            $content .= "</table>";
            $html .= show_debug("log", "Log", $content);
        }
        if (!empty($Account_Data) && verif_connect(true)) {
            $content = "";
            $content .= debug_array($Stats_Data);
            $content .= debug_array($Account_Data);
            $html .= show_debug("perso", "Avatar", $content);
        }
        if (!empty($_SESSION)) {
            $html .= show_debug("session", "Session", debug_array($_SESSION));
        }
        if (!empty($debug_sql_array)) {
            $content = "";
            $content .= "<table border='1'>";
            foreach ($debug_sql_array as $x => $req) {
                $content .= "<tr><th>{$x}</th><td>{$req}</td>";
                if (isset($debug_sql_error[$x])) {
                    $content .= "<td>" . $debug_sql_error[$x][0] . "</td>";
                    $content .= "<td>" . $debug_sql_error[$x][1] . "</td>";
                    $content .= "<td>" . $debug_sql_error[$x][2] . "</td>";
                }
                $content .= "</tr>";
            }
            $content .= "</table>";
            $html .= show_debug("sql", "Requetes", $content);
        }
        if (!empty($_SERVER)) {
            $content = "";
            $content .= "<table border='1'>";
            $content .= debug_array($_SERVER);
            $content .= "</table>";
            $html .= show_debug("server", "Serveur", $content);
        }
        if (!empty($debug_warning_array)) {
            $content = "";
            $content .= "<table border='1'>";
            foreach ($debug_warning_array as $x => $req) {
                $content .= "<tr>";
                $content .= "<th>{$x}</th><td>" . $req['code'] . "</td><td>" . $req['message'] . "</td>";
                $content .= "<td>" . str_replace($corrig_path, "", $req['file']) . "</td>\n\t\t\t\t\t<td>" . $req['line'] . "</td>";
                if (isset($req['trace'])) {
                    $content .= "<td><table>";
                    foreach ($req['trace'] as $n => $t) {
                        if ($n != 0 && $t['function'] !== 'debug_log') {
                            $content .= "<tr>";
                            $content .= "<td>" . (isset($t['file']) ? str_replace($corrig_path, "", $t['file']) : "") . "</td>\n\t\t\t\t\t\t\t\t<td>" . (isset($t['line']) ? $t['line'] : '') . "</td>\n\t\t\t\t\t\t\t\t<td>" . $t['function'] . "</td>\n\t\t\t\t\t\t\t\t<td>" . print_r($t['args'], 1) . "</td>";
                            $content .= "</tr>";
                        }
                    }
                    $content .= "</table></td>";
                }
                $content .= "</tr>";
            }
            $content .= "</table>";
            $html .= show_debug("warning", "Alertes", $content, 2);
        }
        if (!empty($debug_notice_array)) {
            $content = "";
            $content .= "<table border='1'>";
            foreach ($debug_notice_array as $x => $req) {
                $content .= "<tr>";
                $content .= "<th>{$x}</th>";
                $content .= "<td>" . $req['code'] . "</td>";
                $content .= "<td>" . $req['message'] . "</td>";
                $content .= "<td>" . str_replace($corrig_path, "", $req['file']) . "</td>";
                $content .= "<td>" . $req['line'] . "</td>";
                $content .= "</tr>";
            }
            $content .= "</table>";
            $html .= show_debug("notice", "Avertissement", $content, 2);
        }
        if (!empty($debug_unknow_array)) {
            $content = "";
            $content .= "<table border='1'>";
            foreach ($debug_unknow_array as $x => $req) {
                $content .= "<tr>";
//.........这里部分代码省略.........
开发者ID:galadie,项目名称:Caranille-RPG,代码行数:101,代码来源:Debug.php

示例14: my_comments

 /**
  * 获取某个人已经发表过的评论.包括评论内容,评论时间,评论文章id/title/url
  * 默认的是每页10个.
  * @param filter= array(pre_page,page)
  * return  
  */
 public function my_comments($filter = array(), $page = 10)
 {
     $struct = array();
     $number = 10;
     //每页的评论数目
     if (isset($filter['pre_page'])) {
         $number = intval($filter['pre_page']);
     }
     $offset = 0;
     //偏移量
     if (isset($filter['page']) && $filter['page'] > 0) {
         $offset = (intval($filter['page']) - 1) * $number;
     } else {
         $offset = $page > 0 ? ($page - 1) * $number : 0;
     }
     $user_id = get_current_user_id();
     show_debug("my_comments:user_id" . $user_id, __FILE__, __LINE__);
     if ($user_id == 0) {
         //not login return empty
     } else {
         $arg['orderby'] = 'comment_date';
         $arg['order'] = 'desc';
         $arg['number'] = $number;
         $arg['offset'] = $offset;
         $arg['user_id'] = $user_id;
         $comments = get_comments($arg);
         $post_ids = array();
         $post_infos = array();
         foreach ($comments as $comment) {
             $post_ids[] = intval($comment->comment_post_ID);
         }
         show_debug($post_ids, __FILE__, __LINE__);
         if ($post_ids) {
             $post_model = new WP_JSON_Posts($this->server);
             $filter['_bigapp_post_ids'] = $post_ids;
             $response = $post_model->get_posts($filter);
             $lists = $response->get_data();
             foreach ($lists as $list) {
                 $post_info[$list['ID']] = $list;
             }
         }
         foreach ($comments as $comment) {
             $comment = $this->prepare_comment($comment, array('comment', 'meta'), 'collection');
             if (isset($post_info[$comment['post']])) {
                 $comment['post_info']['title'] = $post_info[$comment['post']]['title'];
                 $comment['post_info']['link'] = $post_info[$comment['post']]['link'];
             } else {
                 continue;
             }
             $struct[] = $comment;
         }
     }
     return $struct;
 }
开发者ID:Mushan3420,项目名称:BigApp-PHP7,代码行数:60,代码来源:class-wp-json-comments.php


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