本文整理匯總了PHP中XenForo_Application::_qsPartCounter方法的典型用法代碼示例。如果您正苦於以下問題:PHP XenForo_Application::_qsPartCounter方法的具體用法?PHP XenForo_Application::_qsPartCounter怎麽用?PHP XenForo_Application::_qsPartCounter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XenForo_Application
的用法示例。
在下文中一共展示了XenForo_Application::_qsPartCounter方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: parseQueryString
/**
* Parses a query string (x=y&a=b&c[]=d) into a structured array format.
*
* Note that this can handle very long query strings, but it has problems
* if there are conflicting elements that split the "chunks" that are made
* internally. Workaround this using distinct keys for each input whenever possible.
*
* @param string $string
*
* @return array
*/
public static function parseQueryString($string)
{
$max = intval(@ini_get('max_input_vars'));
if ($max && substr_count($string, '&') >= $max) {
$string = preg_replace_callback('/(?<=^|&)([^=&]+)(\\[\\]|%5B%5D)/U', array('XenForo_Application', 'parseQueryStringCallback'), $string);
self::$_qsPartCounter = array();
$chunks = array_chunk(explode('&', $string), $max, true);
$output = array();
foreach ($chunks as $chunk) {
parse_str(implode('&', $chunk), $values);
$output = self::mapMerge($output, $values);
}
} else {
parse_str($string, $output);
}
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
XenForo_Application::undoMagicQuotes($output);
}
return $output;
}