本文整理汇总了PHP中PMA\libraries\Util::checkParameters方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::checkParameters方法的具体用法?PHP Util::checkParameters怎么用?PHP Util::checkParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA\libraries\Util
的用法示例。
在下文中一共展示了Util::checkParameters方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
*/
if (isset($_REQUEST['set_col_prefs']) && $_REQUEST['set_col_prefs'] == true) {
PMA_setColumnOrderOrVisibility($table, $db);
// script has exited at this point
}
// Default to browse if no query set and we have table
// (needed for browsing from DefaultTabTable)
$tableLength = mb_strlen($table);
$dbLength = mb_strlen($db);
if (empty($sql_query) && $tableLength && $dbLength) {
$sql_query = PMA_getDefaultSqlQueryForBrowse($db, $table);
// set $goto to what will be displayed if query returns 0 rows
$goto = '';
} else {
// Now we can check the parameters
Util::checkParameters(array('sql_query'));
}
/**
* Parse and analyze the query
*/
require_once 'libraries/parse_analyze.lib.php';
list($analyzed_sql_results, $db, $table) = PMA_parseAnalyze($sql_query, $db);
// @todo: possibly refactor
extract($analyzed_sql_results);
/**
* Check rights in case of DROP DATABASE
*
* This test may be bypassed if $is_js_confirmed = 1 (already checked with js)
* but since a malicious user may pass this variable by url/form, we don't take
* into account this case.
*/
示例2:
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Common includes for the database level views
*
* @package PhpMyAdmin
*/
use PMA\libraries\Message;
use PMA\libraries\Response;
use PMA\libraries\URL;
use PMA\libraries\Util;
if (!defined('PHPMYADMIN')) {
exit;
}
PMA\libraries\Util::checkParameters(array('db'));
global $cfg;
global $db;
$is_show_stats = $cfg['ShowStats'];
$db_is_system_schema = $GLOBALS['dbi']->isSystemSchema($db);
if ($db_is_system_schema) {
$is_show_stats = false;
}
/**
* Defines the urls to return to in case of error in a sql statement
*/
$err_url_0 = 'index.php' . URL::getCommon();
$err_url = PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . URL::getCommon(array('db' => $db));
/**
* Ensures the database exists (else move to the "parent" script) and displays
* headers