• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP output_error函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中output_error函数的典型用法代码示例。如果您正苦于以下问题:PHP output_error函数的具体用法?PHP output_error怎么用?PHP output_error使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: get_info

 function get_info($request_id = NULL, $unsubscribe_key = NULL)
 {
     if (is_null($result = $this->lib_archive->get_info($request_id, $unsubscribe_key))) {
         output_error($this->lib_archive->get_error_message());
     }
     output($result);
 }
开发者ID:RimeOfficial,项目名称:postmaster,代码行数:7,代码来源:Archive.php


示例2: serviceOp

 /**
  * GET 服务详情
  */
 public function serviceOp()
 {
     if (!isset($_GET['sid'])) {
         output_error("缺少服务id参数");
         die;
     }
     $service_id = $_GET['sid'];
     $m_service = Model('serviceapi');
     $where = array('service_id' => $service_id);
     $service_info = $m_service->where($where)->order('service_id desc')->select();
     // TODO 服务收藏
     //        if (intval($_GET['fav_id']) > 0) {
     //            $favorites_class = Model('flea_favorites');
     //            if (!$favorites_class->checkFavorites(intval($_GET['fav_id']), 'flea', intval($_GET['user_id']))) {
     //                $service_info[0][is_favorite] = false;
     //            }
     //        }
     $goods_image_path = UPLOAD_SITE_URL . DS . ATTACH_SERVICE . '/';
     //店铺商品图片目录地址
     $desc_image = $m_service->getListImageService(array('item_id' => $service_id, 'upload_type' => 8));
     $m_service->getThumb($desc_image, $goods_image_path);
     $service_info[0]['service_image'] = $desc_image;
     /**
      * 浏览次数更新
      */
     $m_service->updateService(array('service_click' => $service_info[0]['service_click'] + 1), $service_id);
     if (!empty($service_info)) {
         output_data(array('service_info' => $service_info));
     } else {
         output_error("没有此交易");
     }
 }
开发者ID:ff00x0,项目名称:shopnc-api,代码行数:35,代码来源:service.php


示例3: comments_listOp

 /**
  * 商品评价详细页
  */
 public function comments_listOp()
 {
     $goods_id = intval($_GET['goods_id']);
     // 商品详细信息
     $model_goods = Model('goods');
     $goods_info = $model_goods->getGoodsInfoByID($goods_id, '*');
     // 验证商品是否存在
     if (empty($goods_info)) {
         output_error('商品不存在');
     }
     //评价信息
     $goods_evaluate_info = Model('evaluate_goods')->getEvaluateGoodsInfoByGoodsID($goods_id);
     $buy_comments['goods_evaluate_info']['good'] = $goods_evaluate_info['good'];
     $buy_comments['goods_evaluate_info']['normal'] = $goods_evaluate_info['normal'];
     $buy_comments['goods_evaluate_info']['bad'] = $goods_evaluate_info['bad'];
     $buy_comments['goods_evaluate_info']['all'] = $goods_evaluate_info['all'];
     $buy_comments['goods_evaluate_info']['good_percent'] = $goods_evaluate_info['good_percent'];
     $buy_comments['goods_evaluate_info']['normal_percent'] = $goods_evaluate_info['normal_percent'];
     $buy_comments['goods_evaluate_info']['bad_percent'] = $goods_evaluate_info['bad_percent'];
     $buy_comments['goods_evaluate_info']['good_star'] = $goods_evaluate_info['good_star'];
     $buy_comments['goods_evaluate_info']['star_average'] = $goods_evaluate_info['star_average'];
     $buy_comments['comments'] = $this->_get_comments($goods_id, $_GET['type'], 5);
     $buy_comments['goods_evaluate_info']['page'] = $this->_getcomments($goods_id, $_GET['type'], 5);
     if (empty($buy_comments['comments'])) {
         output_error('暂时没有评论');
     }
     if ($buy_comments['goods_evaluate_info']['page']['page'] > $buy_comments['goods_evaluate_info']['page']['show_pa']) {
         $buy_comments['comments'] = null;
     }
     output_data($buy_comments);
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:34,代码来源:buycomments.php


示例4: transactional

 public function transactional($message_id = 0)
 {
     if (is_null($result = $this->lib_message->add_request($message_id))) {
         output_error($this->lib_message->get_error_message());
     }
     output($result);
 }
开发者ID:RimeOfficial,项目名称:postmaster,代码行数:7,代码来源:Request.php


示例5: indexOp

 /**
  * 登录
  */
 public function indexOp()
 {
     if (empty($_POST['seller_name']) || empty($_POST['password']) || !in_array($_POST['client'], $this->client_type_array)) {
         output_error('用户名密码不能为空');
     }
     $model_seller = Model('seller');
     $seller_info = $model_seller->getSellerInfo(array('seller_name' => $_POST['seller_name']));
     if (!$seller_info) {
         output_error('登录失败');
     }
     //店铺所有人或者授权的子账号可以从客户端登录
     if (!($seller_info['is_admin'] || $seller_info['is_client'])) {
         output_error('权限验证失败');
     }
     //验证身份
     $model_member = Model('member');
     $member_info = $model_member->getMemberInfo(array('member_id' => $seller_info['member_id'], 'member_passwd' => strtolower($_POST['password'])));
     if (!$member_info) {
         output_error('用户名密码错误');
     }
     //读取店铺信息
     $model_store = Model('store');
     $store_info = $model_store->getStoreInfoByID($seller_info['store_id']);
     //更新卖家登陆时间
     $model_seller->editSeller(array('last_login_time' => TIMESTAMP), array('seller_id' => $seller_info['seller_id']));
     //生成登录令牌
     $token = $this->_get_token($seller_info['seller_id'], $seller_info['seller_name'], $_POST['client']);
     if ($token) {
         output_data(array('seller_name' => $seller_info['seller_name'], 'store_name' => $store_info['store_name'], 'key' => $token));
     } else {
         output_error('登录失败');
     }
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:36,代码来源:seller_login.php


示例6: indate_code_listOp

 public function indate_code_listOp()
 {
     $order_id = intval($_POST['order_id']);
     if ($order_id <= 0) {
         output_error('订单不存在');
     }
     $model_vr_order = Model('vr_order');
     $condition = array();
     $condition['order_id'] = $order_id;
     $condition['buyer_id'] = $this->member_info['member_id'];
     $order_info = $model_vr_order->getOrderInfo($condition);
     if (empty($order_info) || $order_info['delete_state'] == ORDER_DEL_STATE_DROP) {
         output_error('订单不存在');
     }
     $order_list = array();
     $order_list[$order_id] = $order_info;
     $order_list = $model_vr_order->getCodeRefundList($order_list);
     //没有使用的兑换码列表
     $code_list = array();
     if (!empty($order_list[$order_id]['code_list'])) {
         foreach ($order_list[$order_id]['code_list'] as $value) {
             $code = array();
             $code['vr_code'] = $value['vr_code'];
             $code['vr_indate'] = $value['vr_indate'];
             $code_list[] = $code;
         }
     }
     output_data(array('code_list' => $code_list));
 }
开发者ID:qqq232575,项目名称:shopx,代码行数:29,代码来源:member_vr_order.php


示例7: addRule

 public function addRule()
 {
     $express_id = $this->input->get_post('express_id');
     $province_code = $this->input->get_post('province_code');
     $rule = $this->express_rule_model->getOneByProvince($express_id, $province_code);
     if (!$rule) {
         $rule_add = array('express_id' => $express_id, 'province_code' => $province_code);
         $rule['rule_id'] = $this->express_rule_model->add($rule_add);
     }
     //先检查是否存在该区间
     $weight_min = $this->input->get_post('weight_min');
     $weight_max = $this->input->get_post('weight_max');
     $item1 = $this->express_rule_model->getItemByRuleAndWeight($rule['rule_id'], $weight_min);
     $item2 = $this->express_rule_model->getItemByRuleAndWeight($rule['rule_id'], $weight_max);
     $item3 = $this->express_rule_model->getItemByRuleAndWeightBetween($rule['rule_id'], $weight_min, $weight_max);
     if ($item1) {
         output_error('其他区间已经包含起始重量');
     }
     if ($item2) {
         output_error('其他区间已经包含结束重量');
     }
     if ($item3) {
         output_error('重量区间重复');
     }
     $item = array('rule_id' => $rule['rule_id'], 'express_id' => $express_id, 'price_type' => $this->input->get_post('price_type'), 'price' => $this->input->get_post('price'), 'weight_min' => $weight_min, 'weight_max' => $weight_max, 'sort_order' => $this->input->get_post('sort_order'));
     $this->express_rule_item_model->add($item);
     $this->show();
 }
开发者ID:EnzoLynn,项目名称:gugu-manager,代码行数:28,代码来源:ExpressRule.php


示例8: store_editOp

 /**
  * 编辑店铺
  */
 public function store_editOp()
 {
     $upload = new UploadFile();
     /**
      * 上传店铺图片
      */
     if (!empty($_FILES['store_banner']['name'])) {
         $upload->set('default_dir', ATTACH_STORE);
         $upload->set('thumb_ext', '');
         $upload->set('file_name', '');
         $upload->set('ifremove', false);
         $result = $upload->upfile('store_banner');
         if ($result) {
             $_POST['store_banner'] = $upload->file_name;
         } else {
             showDialog($upload->error);
         }
     }
     //删除旧店铺图片
     if (!empty($_POST['store_banner']) && !empty($store_info['store_banner'])) {
         @unlink(BASE_UPLOAD_PATH . DS . ATTACH_STORE . DS . $this->store_info['store_banner']);
     }
     /**
      * 更新入库
      */
     $param = array('store_banner' => empty($_POST['store_banner']) ? $this->store_info['store_banner'] : $_POST['store_banner'], 'store_qq' => $_POST['store_qq'], 'store_ww' => $_POST['store_ww'], 'store_phone' => $_POST['store_phone'], 'store_zy' => $_POST['store_zy'], 'store_keywords' => $_POST['seo_keywords'], 'store_description' => $_POST['seo_description']);
     $result = Model('store')->editStore($param, array('store_id' => $this->store_info['store_id']));
     if (!$result) {
         output_error('编辑失败');
     }
     output_data('1');
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:35,代码来源:seller_store.php


示例9: addRule

 public function addRule()
 {
     $customer_id = 0;
     $customer_rent_id = $this->input->get_post('customer_rent_id');
     $province_code = $this->input->get_post('province_code');
     $rule = $this->customer_express_rule_model->getOneByRent($customer_rent_id, $province_code);
     $customer_id = $rule['customer_id'];
     if (!$rule) {
         $rent = $this->customer_rent_model->getCustomerRent($customer_rent_id);
         $customer_id = $rent['customer_id'];
         $rule_add = array('customer_id' => $customer_id, 'customer_rent_id' => $customer_rent_id, 'province_code' => $province_code);
         $rule['rule_id'] = $this->customer_express_rule_model->add($rule_add);
     }
     $weight_min = $this->input->get_post('weight_min');
     $weight_max = $this->input->get_post('weight_max');
     //先检查是否存在该区间
     $item1 = $this->customer_express_rule_model->getItemByRuleAndWeight($rule['rule_id'], $weight_min);
     $item2 = $this->customer_express_rule_model->getItemByRuleAndWeight($rule['rule_id'], $weight_max);
     $item3 = $this->customer_express_rule_model->getItemByRuleAndWeightBetween($rule['rule_id'], $weight_min, $weight_max);
     if ($item1) {
         output_error('其他区间已经包含起始重量');
     }
     if ($item2) {
         output_error('其他区间已经包含结束重量');
     }
     if ($item3) {
         output_error('重量区间重复');
     }
     $item = array('rule_id' => $rule['rule_id'], 'customer_id' => $customer_id, 'customer_rent_id' => $customer_rent_id, 'weight_price_type' => $this->input->get_post('weight_price_type'), 'weight_min' => $weight_min, 'weight_max' => $weight_max, 'weight_start' => $this->input->get_post('weight_start'), 'weight_start_price' => $this->input->get_post('weight_start_price'), 'weight_pre' => $this->input->get_post('weight_pre'), 'weight_pre_price' => $this->input->get_post('weight_pre_price'), 'sort_order' => $this->input->get_post('sort_order'));
     $this->customer_express_rule_item_model->add($item);
     $this->show();
 }
开发者ID:EnzoLynn,项目名称:gugu-manager,代码行数:32,代码来源:CustomerExpressRule.php


示例10: __construct

 public function __construct()
 {
     parent::__construct();
     if (C('voucher_allow') != 1) {
         output_error('暂不支持代金券设置');
         //showDialog(L('voucher_pointunavailable'),'index.php','error');
     }
 }
开发者ID:lehman3087,项目名称:wanhaoshop,代码行数:8,代码来源:voucher.php


示例11: load_member

function load_member($pid)
{
    $member = new MEMBER(array('person_id' => $pid));
    if (!$member->valid) {
        output_error('Unknown ID');
    }
    $member->load_extra_info();
    return $member;
}
开发者ID:palfrey,项目名称:twfy,代码行数:9,代码来源:index.php


示例12: getMysqlConnection

 private function getMysqlConnection($db)
 {
     if (!@is_string($db) || empty($db)) {
         output_error(404, "404 Database Not Found");
     } else {
         $result = @mysqli_connect($this->hostname, $this->myql_username, $this->myql_password, $db) or output_error(503, "503 Database Unavailable");
         return $result;
     }
 }
开发者ID:nralbrecht,项目名称:mysqli-connect,代码行数:9,代码来源:mysqli-connect.php


示例13: returnopenidOp

 public function returnopenidOp()
 {
     $payment_api = $this->_get_payment_api();
     if ($this->payment_code != 'wxpay') {
         output_error('支付参数异常');
         die;
     }
     $payment_api->getopenid();
 }
开发者ID:ff00x0,项目名称:shopnc,代码行数:9,代码来源:payment.php


示例14: image_uploadOp

 public function image_uploadOp()
 {
     $logic_goods = Logic('goods');
     $result = $logic_goods->uploadGoodsImage($_POST['name'], $this->seller_info['store_id'], $this->store_grade['sg_album_limit']);
     if (!$result['state']) {
         output_error($result['msg']);
     }
     output_data(array('image_name' => $result['data']['name']));
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:9,代码来源:seller_album.php


示例15: recommend_voucherOp

 public function recommend_voucherOp()
 {
     //开启代金券功能后查询推荐的热门代金券列表
     if (C('voucher_allow') == 1) {
         $recommend_voucher = Model('voucher')->getRecommendTemplate(6);
         output_data(array('vouchers' => $recommend_voucher));
     } else {
         output_error("并没有开启代金券功能");
         die;
     }
 }
开发者ID:Maplecms,项目名称:shopnc-api,代码行数:11,代码来源:point_shop.php


示例16: direct

 public function direct()
 {
     $this->load->library('lib_send_email');
     if (is_null($result = $this->lib_send_email->direct(getenv('email_admin'), 'Foobar', ':thumbs_up:'))) {
         output_error($this->lib_send_email->get_error_message());
     } else {
         $this->load->helper('api');
         $response = array('email_admin' => getenv('email_admin'), 'result' => $result);
         output($response);
     }
 }
开发者ID:RimeOfficial,项目名称:postmaster,代码行数:11,代码来源:Test.php


示例17: store_goods_classOp

 /**
  * 店铺商品分类
  */
 public function store_goods_classOp()
 {
     $store_id = (int) $_REQUEST['store_id'];
     $store_online_info = Model('store')->getStoreOnlineInfoByID($store_id);
     if (empty($store_online_info)) {
         output_error('店铺不存在或未开启');
     }
     $store_info = array();
     $store_info['store_id'] = $store_online_info['store_id'];
     $store_info['store_name'] = $store_online_info['store_name'];
     output_data(array('store_info' => $store_info, 'store_goods_class' => Model('store_goods_class')->getStoreGoodsClassPlainList($store_id)));
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:15,代码来源:store.php


示例18: update_metadata

 public function update_metadata($list = NULL)
 {
     $this->load->library('lib_list_unsubscribe');
     $list_unsubscribe = $this->lib_list_unsubscribe->get_by_name($list);
     if (empty($list_unsubscribe)) {
         output_error(['status' => 404, 'message' => 'list not found']);
     }
     if (is_null($result = $this->lib_recipient->update_metadata($list_unsubscribe['list_id']))) {
         output_error($this->lib_recipient->get_error_message());
     }
     output($result);
 }
开发者ID:RimeOfficial,项目名称:postmaster,代码行数:12,代码来源:Recipient.php


示例19: favorites_delOp

 /**
  * 删除收藏
  */
 public function favorites_delOp()
 {
     $fav_id = intval($_POST['fav_id']);
     if ($fav_id <= 0) {
         output_error('参数错误');
     }
     $model_favorites = Model('favorites');
     $condition = array();
     $condition['fav_id'] = $fav_id;
     $condition['member_id'] = $this->member_info['member_id'];
     $model_favorites->delFavorites($condition);
     output_data('1');
 }
开发者ID:lehman3087,项目名称:wanhaoshop,代码行数:16,代码来源:member_favorites.php


示例20: copy

 public function copy()
 {
     $rent_no_from = $this->input->post('rent_no_from');
     $rent_from = $this->customer_rent_model->getCustomerRentByRentNo($rent_no_from);
     $rent_no_to = $this->input->post('rent_no_to');
     $rent_to = $this->customer_rent_model->getCustomerRentByRentNo($rent_no_to);
     if ($rent_to) {
         $this->customer_rent_model->copyRule($rent_from['customer_rent_id'], $rent_to['customer_rent_id']);
         output_success();
     } else {
         output_error('填写的合同编号不存在');
     }
 }
开发者ID:EnzoLynn,项目名称:gugu-manager,代码行数:13,代码来源:CustomerRent.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP output_errors函数代码示例发布时间:2022-05-15
下一篇:
PHP output_data函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap