本文整理汇总了PHP中mobile_core::diconv_array方法的典型用法代码示例。如果您正苦于以下问题:PHP mobile_core::diconv_array方法的具体用法?PHP mobile_core::diconv_array怎么用?PHP mobile_core::diconv_array使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mobile_core
的用法示例。
在下文中一共展示了mobile_core::diconv_array方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: common
function common()
{
global $_G;
if (!defined('IN_MOBILE_API')) {
return;
}
if (!$_G['setting']['mobile']['allowmobile']) {
mobile_core::result(array('error' => 'mobile_is_closed'));
}
if (!empty($_GET['tpp'])) {
$_G['tpp'] = intval($_GET['tpp']);
}
if (!empty($_GET['ppp'])) {
$_G['ppp'] = intval($_GET['ppp']);
}
$_G['pluginrunlist'] = array('mobile', 'qqconnect', 'wechat');
$_G['siteurl'] = preg_replace('/api\\/mobile\\/$/', '', $_G['siteurl']);
$_G['setting']['msgforward'] = '';
$_G['setting']['cacheindexlife'] = $_G['setting']['cachethreadlife'] = false;
if (!$_G['setting']['mobile']['nomobileurl'] && function_exists('diconv') && !empty($_GET['charset'])) {
$_GET = mobile_core::diconv_array($_GET, $_GET['charset'], $_G['charset']);
}
if (class_exists('mobile_api', false) && method_exists('mobile_api', 'common')) {
mobile_api::common();
}
}
示例2: common
function common()
{
global $_G;
if (!defined('IN_MOBILE_API')) {
return;
}
if (!$_G['setting']['mobile']['allowmobile']) {
mobile_core::result(array('error' => 'mobile_is_closed'));
}
if (!empty($_GET['tpp'])) {
$_G['tpp'] = intval($_GET['tpp']);
}
if (!empty($_GET['ppp'])) {
$_G['ppp'] = intval($_GET['ppp']);
}
$_G['pluginrunlist'] = array('mobile', 'qqconnect', 'wechat');
$_G['siteurl'] = preg_replace('/api\\/mobile\\/$/', '', $_G['siteurl']);
$_G['setting']['msgforward'] = '';
$_G['setting']['cacheindexlife'] = $_G['setting']['cachethreadlife'] = false;
if (!$_G['setting']['mobile']['nomobileurl'] && function_exists('diconv') && !empty($_GET['charset'])) {
$_GET = mobile_core::diconv_array($_GET, $_GET['charset'], $_G['charset']);
}
if ($_GET['_auth']) {
require_once DISCUZ_ROOT . './source/plugin/wechat/wsq.class.php';
$uid = wsq::decodeauth($_GET['_auth']);
$disablesec = false;
if ($uid) {
require_once libfile('function/member');
$member = getuserbyuid($uid, 1);
if ($_GET['module'] != 'login') {
setloginstatus($member, 1296000);
$disablesec = true;
} else {
$disablesec = logincheck($member['username']);
}
} elseif ($_GET['module'] == 'login') {
$disablesec = logincheck($_GET['username']);
}
if ($disablesec) {
$_G['setting']['seccodedata'] = array();
$_G['setting']['seccodestatus'] = 0;
$_G['setting']['secqaa'] = array();
unset($_GET['force']);
define('IN_MOBILE_AUTH', $uid);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$_GET['formhash'] = $_G['formhash'];
}
}
}
if (class_exists('mobile_api', false) && method_exists('mobile_api', 'common')) {
mobile_api::common();
}
}