当前位置: 首页>>代码示例>>PHP>>正文


PHP mobile_core::make_cors方法代码示例

本文整理汇总了PHP中mobile_core::make_cors方法的典型用法代码示例。如果您正苦于以下问题:PHP mobile_core::make_cors方法的具体用法?PHP mobile_core::make_cors怎么用?PHP mobile_core::make_cors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mobile_core的用法示例。


在下文中一共展示了mobile_core::make_cors方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: result

	function result($result) {
		global $_G;
		ob_end_clean();
		function_exists('ob_gzhandler') ? ob_start('ob_gzhandler') : ob_start();
		header("Content-type: application/json");
		mobile_core::make_cors($_SERVER['REQUEST_METHOD'], REQUEST_METHOD_DOMAIN);
		$result = mobile_core::json(mobile_core::format($result));
		if(defined('FORMHASH')) {
			echo empty($_GET['jsoncallback_'.FORMHASH]) ? $result : $_GET['jsoncallback_'.FORMHASH].'('.$result.')';
		} else {
			echo $result;
		}
		exit;
	}
开发者ID:noikiy,项目名称:ejia,代码行数:14,代码来源:mobile.class.php

示例2: exit

 */
if (!defined('IN_MOBILE_API')) {
    exit('Access Denied');
}
require './source/class/class_core.php';
$discuz = C::app();
$discuz->init();
if (!defined('DISCUZ_VERSION')) {
    require './source/discuz_version.php';
}
if (in_array('mobile', $_G['setting']['plugins']['available'])) {
    loadcache('wsq_checkinfo');
    if (!$_G['cache']['wsq_checkinfo'] || TIMESTAMP - $_G['cache']['wsq_checkinfo']['expiration'] > 600) {
        $_G['wechat']['setting'] = unserialize($_G['setting']['mobilewechat']);
        $forums = C::t('forum_forum')->fetch_all_by_status(1);
        foreach ($forums as $forum) {
            $posts += $forum['posts'];
        }
        loadcache('userstats');
        $array = array('discuzversion' => DISCUZ_VERSION, 'charset' => CHARSET, 'version' => MOBILE_PLUGIN_VERSION, 'pluginversion' => $_G['setting']['plugins']['version']['mobile'], 'regname' => $_G['setting']['regname'], 'qqconnect' => in_array('qqconnect', $_G['setting']['plugins']['available']) ? '1' : '0', 'wsqqqconnect' => in_array('qqconnect', $_G['setting']['plugins']['available']) ? '1' : '0', 'wsqhideregister' => $_G['wechat']['setting']['wechat_allowregister'] && $_G['wechat']['setting']['wechat_allowfastregister'] ? '1' : '0', 'sitename' => $_G['setting']['bbname'], 'mysiteid' => $_G['setting']['my_siteid'], 'ucenterurl' => $_G['setting']['ucenterurl'], 'defaultfid' => $_G['wechat']['setting']['wsq_fid'], 'totalposts' => $posts, 'totalmembers' => $_G['cache']['userstats']['totalmembers']);
        savecache('wsq_checkinfo', array('variable' => $array, 'expiration' => TIMESTAMP));
    } else {
        $array = $_G['cache']['wsq_checkinfo']['variable'];
    }
} else {
    $array = array();
}
$array['testcookie'] = $_G['cookie']['testcookie'];
$data = mobile_core::json($array);
mobile_core::make_cors($_SERVER['REQUEST_METHOD'], REQUEST_METHOD_DOMAIN);
echo $data;
开发者ID:samyex6,项目名称:discuz3.2-lite,代码行数:31,代码来源:check.php


注:本文中的mobile_core::make_cors方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。