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


PHP Output::Json方法代码示例

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


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

示例1: json

function json($data, $type = 'eval')
{
    $type = strtolower($type);
    $allow = array('eval', 'alert', 'updater', 'dialog', 'mix', 'refresh');
    if (false == in_array($type, $allow)) {
        return false;
    }
    Output::Json(array('data' => $data, 'type' => $type));
}
开发者ID:jowino,项目名称:bd786110cact,代码行数:9,代码来源:common.php

示例2: json

function json($data, $type = 'eval')
{
    $type = strtolower($type);
    $allow = array('eval', 'alert', 'right', 'notice', 'sucsses');
    if (false == in_array($type, $allow)) {
        return false;
    }
    Output::Json(array('data' => $data, 'type' => $type));
}
开发者ID:deepziyu,项目名称:JX3PVE,代码行数:9,代码来源:common.php

示例3: user_email

 function user_email()
 {
     $email = $this->_request("v");
     $users = D("CmsUsers")->getByEmail($email);
     if ($users) {
         Output::Json(null, 1);
     } else {
         Output::Json(0);
     }
 }
开发者ID:Germey,项目名称:yinxingapply,代码行数:10,代码来源:ValidationAction.class.php

示例4: check_email

 function check_email()
 {
     $v = $this->_request("v");
     $user_id = $this->_request("n");
     $user_id = str_replace("id-", "", $user_id);
     $u = M("Users")->getByEmail($v);
     if (empty($u) || $u['id'] == $user_id) {
         Output::Json(0);
     } else {
         Output::Json(null, 1);
     }
 }
开发者ID:Germey,项目名称:yinxingpm,代码行数:12,代码来源:ValidateAction.class.php

示例5: array

    $o = array();
    $o['id'] = $one['id'];
    $o['link'] = "{$si['site_url']}/team.php?id={$one['id']}";
    $o['large_image_url'] = team_image($one['image']);
    $o['small_image_url'] = team_image($one['image'], true);
    $o['title'] = $one['title'];
    $o['product'] = $one['product'];
    $o['team_price'] = $one['team_price'];
    $o['market_price'] = $one['market_price'];
    $o['rebate'] = team_discount($one);
    $o['start_date'] = date('c', $one['begin_time']);
    $o['end_date'] = date('c', $one['end_time']);
    $o['state'] = $one['state'];
    $o['tipped'] = $one['reach_time'] > 0;
    $o['tipped_date'] = date('c', $one['reach_time']);
    $o['tipping_point'] = abs(intval($one['min_number']));
    $o['current_point'] = abs(intval($one['now_number']));
    $co = array();
    $co['limited_quantity'] = $one['per_number'] > 0;
    $co['maximum_purchase'] = abs(intval($one['per_number']));
    $co['expiration_date'] = date('c', $one['expire_time']);
    $o['conditions'] = $co;
    $o['city'] = $city['name'];
    $o['group'] = $group['name'];
    $oa[$one['id']] = $o;
}
$o = array('site' => $si, 'teams' => $oa);
//if ('json'===strtolower(strval($_GET['s'])))
Output::Json($o);
//header('Content-Type: application/xml; charset=UTF-8');
//Output::Xml($o);
开发者ID:norain2050,项目名称:zuituware,代码行数:31,代码来源:getTeamsByCity.php

示例6: dirname

<?php

require_once dirname(dirname(__FILE__)) . '/app.php';
cookieset('newbie', 'N');
Output::Json(0);
开发者ID:yunsite,项目名称:hhzuitu,代码行数:5,代码来源:newbie.php

示例7: array

	$city = $cityList[$one['city']];
	$group = $city;
	$o = array();
	$o['pid'] = $one['id'];
	$o['url'] = "{$si['url']}/?view={$one['id']}";
	$o['image_large'] = imager($one['img']);
	$o['image_small'] = imager($one['img'], IMG_Small);
	$o['title'] = $one['name'];
	$o['intro'] = $one['intro'];
	$o['now_price'] = $one['nowprice'];
	$o['price'] = $one['price'];
	$o['discount'] = $one['discount'];
	$o['begin_date'] = date('Y-m-d H:i:s', $one['begintime']);
	$o['finish_date'] = date('Y-m-d H:i:s', $one['overtime']);
	$o['status'] = $one['status'];

	$co = array();
	$co['maximum'] = abs(intval($one['oncemax']));
	$co['deadline'] = date('Y-m-d H:i:s', $one['perioddate']);
	$o['conditions'] = $co;

	$o['city'] = $city;
	$oa[$one['id']] = $o;
}
$o = array( 'site' => $si, 'products' => $oa );
if (ENC_IS_GBK) $o = array_iconv('GBK', 'UTF-8', $o);
if ('json'===strtolower(strval($_GET['s']))) Output::Json($o);
header('Content-Type: application/xml; charset=UTF-8');
Output::Xml($o);

?>
开发者ID:pf5512,项目名称:phpstudy,代码行数:31,代码来源:index.php


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