本文整理匯總了PHP中Toolbox::setDebugMode方法的典型用法代碼示例。如果您正苦於以下問題:PHP Toolbox::setDebugMode方法的具體用法?PHP Toolbox::setDebugMode怎麽用?PHP Toolbox::setDebugMode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Toolbox
的用法示例。
在下文中一共展示了Toolbox::setDebugMode方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header_html
header_html(__('Beginning of the installation'));
step0();
break;
case "Etape_0":
// choice ok , go check system
checkConfigFile();
//TRANS %s is step number
header_html(sprintf(__('Step %d'), 0));
$_SESSION["Test_session_GLPI"] = 1;
step1($_POST["update"]);
break;
case "Etape_1":
// check ok, go import mysql settings.
checkConfigFile();
// check system ok, we can use specific parameters for debug
Toolbox::setDebugMode(Session::DEBUG_MODE, 0, 0, 1);
header_html(sprintf(__('Step %d'), 1));
step2($_POST["update"]);
break;
case "Etape_2":
// mysql settings ok, go test mysql settings and select database.
checkConfigFile();
header_html(sprintf(__('Step %d'), 2));
step3($_POST["db_host"], $_POST["db_user"], $_POST["db_pass"], $_POST["update"]);
break;
case "Etape_3":
// Create and fill database
checkConfigFile();
header_html(sprintf(__('Step %d'), 3));
if (empty($_POST["databasename"])) {
$_POST["databasename"] = "";
示例2: array_search
$CFG_GLPI["typedoc_icon_dir"] = $CFG_GLPI["root_doc"] . "/pics/icones";
}
} else {
echo "Error accessing config table";
exit;
}
if (isCommandLine() && isset($_SERVER['argv'])) {
$key = array_search('--debug', $_SERVER['argv']);
if ($key) {
$_SESSION['glpi_use_mode'] = Session::DEBUG_MODE;
unset($_SERVER['argv'][$key]);
$_SERVER['argv'] = array_values($_SERVER['argv']);
$_SERVER['argc']--;
}
}
Toolbox::setDebugMode();
if (isset($_SESSION["glpiroot"]) && $CFG_GLPI["root_doc"] != $_SESSION["glpiroot"]) {
Html::redirect($_SESSION["glpiroot"]);
}
// Override cfg_features by session value
foreach ($CFG_GLPI['user_pref_field'] as $field) {
if (!isset($_SESSION["glpi{$field}"]) && isset($CFG_GLPI[$field])) {
$_SESSION["glpi{$field}"] = $CFG_GLPI[$field];
}
}
// Check maintenance mode
if (isset($CFG_GLPI["maintenance_mode"]) && $CFG_GLPI["maintenance_mode"]) {
if (isset($_GET['skipMaintenance']) && $_GET['skipMaintenance']) {
$_SESSION["glpiskipMaintenance"] = 1;
}
if (!isset($_SESSION["glpiskipMaintenance"]) || !$_SESSION["glpiskipMaintenance"]) {