當前位置: 首頁>>代碼示例>>PHP>>正文


PHP set_debug函數代碼示例

本文整理匯總了PHP中set_debug函數的典型用法代碼示例。如果您正苦於以下問題:PHP set_debug函數的具體用法?PHP set_debug怎麽用?PHP set_debug使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了set_debug函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: set_debug

<?php

/*
 * LibreNMS
 *
 * Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or (at your
 * option) any later version.  Please see LICENSE.txt at the top level of
 * the source code distribution for details.
 */
require_once '../includes/defaults.inc.php';
set_debug($_REQUEST['debug']);
require_once '../config.php';
require_once '../includes/definitions.inc.php';
require_once 'includes/functions.inc.php';
require_once '../includes/functions.php';
require_once 'includes/authenticate.inc.php';
if (!$_SESSION['authenticated']) {
    echo 'unauthenticated';
    exit;
}
$type = mres($_POST['type']);
if ($type == 'placeholder') {
    $output = "<span style='text-align:left;'><br><h3>Click on the Edit Dashboard button (next to the list of dashboards) to add widgets</h3><br><h4><strong>Remember:</strong> You can only move & resize widgets when you're in <strong>Edit Mode</strong>.</h4><span>";
    $status = 'ok';
    $title = 'Placeholder';
} elseif (is_file('includes/common/' . $type . '.inc.php')) {
    $results_limit = 10;
開發者ID:HenocKA,項目名稱:librenms,代碼行數:31,代碼來源:ajax_dash.php

示例2: intval

<?php

include_once "../../../mainfile.php";
if (isAdmin()) {
    $v = intval($_GET['v']);
    set_debug($v);
    header("location:" . $_SERVER["HTTP_REFERER"]);
}
//設定除錯模式
function set_debug($v = 1)
{
    global $xoopsDB;
    $sql = "update  " . $xoopsDB->prefix("config") . " set conf_value='{$v}' where conf_title ='_MD_AM_DEBUGMODE'";
    $xoopsDB->queryF($sql) or redirect_header($_SERVER['PHP_SELF'], 3, mysql_error());
}
//判斷是否為管理員
function isAdmin()
{
    global $xoopsUser, $xoopsModule;
    $isAdmin = false;
    if ($xoopsUser) {
        $isAdmin = $xoopsUser->isAdmin(1);
    }
    return $isAdmin;
}
開發者ID:XoopsThemes,項目名稱:school2015,代碼行數:25,代碼來源:debug.php


注:本文中的set_debug函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。