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

PHP showError函数代码示例

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

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



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

示例1: add

 /**
  * 添加或修改项目类型
  */
 function add()
 {
     $this->load->model('proTypeModel');
     if ($_POST) {
         $proTypeId = (int) $this->input->get('proTypeId');
         $data = array('proTypeName' => $this->input->post('proTypeName'), 'statusIs' => (int) $this->input->post('statusIs'));
         if ($proTypeId) {
             if ($this->proTypeModel->edit(array('proTypeId' => $proTypeId), $data)) {
                 $this->proTypeModel->createCache();
                 showSuccess('修改项目类型成功');
             } else {
                 showError('修改项目类型失败');
             }
         } else {
             $data['createTime'] = time();
             if ($this->proTypeModel->add($data)) {
                 $this->proTypeModel->createCache();
                 showSuccess('添加项目类型成功');
             } else {
                 showError('添加项目类型失败');
             }
         }
     } else {
         $proTypeId = (int) $this->input->get('proTypeId');
         if ($proTypeId) {
             $proTypeData = $this->proTypeModel->getData(array('proTypeId' => $proTypeId));
             $this->viewData['proTypeData'] = $proTypeData;
         }
         $this->load->view('AdminProType/add', $this->viewData);
     }
 }
开发者ID:zhaojianhui129,项目名称:implement2016,代码行数:34,代码来源:AdminProType.php


示例2: parse_less

function parse_less($filename, $file)
{
    global $less_file, $is_dev;
    $options = array();
    if ($is_dev) {
        $options['sourceMap'] = true;
        $options['sourceMapWriteTo'] = '../css/' . $file . '.map';
        $options['sourceMapURL'] = '../css/' . $file . '.map';
    } else {
        $options['compress'] = true;
    }
    $options['cache_dir'] = '../css_cache';
    try {
        $parser = new Less_Parser($options);
        $parser->parseFile($less_file, '../css/');
        ob_start();
        echo $parser->getCss();
        $css = ob_get_contents();
        ob_end_clean();
        header("Content-type: text/css");
        @file_put_contents('../css/' . $file . '.css', $css);
        return $css;
    } catch (Exception $e) {
        header("Content-type: text/css");
        echo '/* LESS ERROR : ' . "\n\n" . $e->getMessage() . "\n\n" . '*/';
        showError($file . '.less');
    }
}
开发者ID:CamilleBouliere,项目名称:LESS-PHP---Out-of-the-box,代码行数:28,代码来源:less_compiler.php


示例3: exception_handler

function exception_handler($exception)
{
    ob_end_clean();
    //logError($exception);
    showError($exception);
    exit;
}
开发者ID:agroff,项目名称:FindPuppies,代码行数:7,代码来源:initialize.php


示例4: rebuildHistory

function rebuildHistory()
{
    $states = array('open', 'closed');
    foreach ($states as $state) {
        $page = 1;
        $lastPage = $page + 9;
        while ($page <= $lastPage) {
            $file = getSSLPage("https://api.github.com/repos/highslide-software/highcharts.com/issues" . "?page={$page}&state={$state}");
            $issues = json_decode($file);
            if (is_array($issues)) {
                if (sizeof($issues) === 0) {
                    echo "--- No more {$state} issues ---";
                    break;
                }
                echo "\n<h2>Page: {$state} {$page}</h2>\n";
                foreach ($issues as $i => $issue) {
                    echo '#' . $issue->number . ', ';
                }
                file_put_contents("pages/{$state}-{$page}.json", $file);
                $page++;
            } else {
                showError($issues);
                break;
            }
        }
    }
}
开发者ID:franksli,项目名称:highcharts,代码行数:27,代码来源:import.php


示例5: executeQuery

 public static function executeQuery($sql)
 {
     include 'db.inc';
     include_once 'error.inc';
     // 1. Tao ket noi CSDL
     if (!($connection = mysql_connect($hostName, $username, $password))) {
         die("couldn't connect to localhost");
     }
     if (!mysql_select_db($databaseName, $connection)) {
         showError();
     }
     //2. Thiet lap font Unicode
     if (!mysql_query("set names 'utf8'")) {
         showError();
     }
     // Thuc thi cau truy van
     if (!($result = mysql_query($sql, $connection))) {
         showError();
     }
     // Dong ket noi CSDL
     if (!mysql_close($connection)) {
         showError();
     }
     return $result;
 }
开发者ID:xxhhmxx,项目名称:Webstory,代码行数:25,代码来源:DataProvider.php


示例6: IAUTH_auth

function IAUTH_auth($appid, $uid, $rightStr, $state = '', $faile_t = '2036-12-31 23:59:59')
{
    Check($appid, 'appid');
    Check($uid, 'uid');
    if (intval($uid) <= 0) {
        showError('use manage function instead');
    }
    Check($faile_t, 'faile_t');
    $rights = Check($rightStr, 'rights');
    $appType = GetAppInfo($appid, 'app_type');
    IAUTH_remove_auth($uid, $appid);
    if ($appType == 'WSC') {
        Check($state, 'state');
        $callback = GetAppInfo($appid, 'call_back');
        $verifier = newVerifier('auth', $appid, $uid, $rights, $faile_t, '', '', $state);
        accessLog('AUTH ' . $appid . ' ' . $uid . ' ' . $rightStr . ' ' . $faile_t . ' ' . $state);
        return URL($callback) . 'verifier=' . $verifier . '&state=' . $state;
    }
    if ($appType == 'UAC') {
        $verifier = newVerifier('auth', $appid, $uid, $rights, $faile_t);
        accessLog('AUTH ' . $appid . ' ' . $uid . ' ' . $rightStr . ' ' . $faile_t);
        return $verifier;
    }
    throw new IAuthException('db error');
}
开发者ID:shiyake,项目名称:php-ihome,代码行数:25,代码来源:IAuthManage.php


示例7: add

 /**
  * 添加页面
  * 重写父类的方法,父类的ADD方法满足不了要求
  */
 public function add()
 {
     if (IS_POST) {
         //获取数据
         if ($this->model->create() !== false) {
             //判断数据是否正确
             //插入数据库
             $requestData = I('post.');
             //通过第三个参数告知不额外处理
             $requestData['intro'] = I('post.intro', '', false);
             if ($this->model->add($requestData) !== false) {
                 $this->success('添加成功', cookie('__forward__'));
                 return;
                 //防止后面代码执行
             }
         }
         $this->error('操作错误' . showError($this->model));
     } else {
         //显示视图,调用钩子函数
         $this->_before_edit_view();
         //给页面分配树的数据
         $this->assign('meta_title', '添加' . $this->meta_title);
         $this->display('add');
     }
 }
开发者ID:puwei163,项目名称:puwei,代码行数:29,代码来源:GoodsController.class.php


示例8: logoutUser

function logoutUser()
{
    global $cfg, $db;
    $sql = "DELETE FROM tf_log WHERE user_id=" . $db->qstr($cfg["user"]) . " and action=" . $db->qstr($cfg["constants"]["hit"]);
    // do the SQL
    $result = $db->Execute($sql);
    showError($db, $sql);
}
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:8,代码来源:logout.php


示例9: Close

 public static function Close($connection)
 {
     include_once 'error.php';
     // Đóng kết lối
     if (!@mysql_close($connection)) {
         showError();
     }
 }
开发者ID:realolliebee,项目名称:closes-shop,代码行数:8,代码来源:DataProvider.php


示例10: index

 /**
  * 
  * @param string $id
  * @return void
  */
 public function index($id)
 {
     $item = $this->mItem->getItem($id);
     if (!$item) {
         showError('The classified of ad does not exist.', 'Not Found', 404);
     }
     redirect($item->link);
 }
开发者ID:khalid9th,项目名称:ocAds,代码行数:13,代码来源:cItem.php


示例11: insert_shop_refill

function insert_shop_refill($shop_id, $item_type, $item_value_min, $item_value_growth, $item_value_growth_probability, $item_count_min)
{
    $query = "replace into phaos_shop_refill\n          ( shop_id, item_type, item_value_min, item_value_growth, item_value_growth_probability, item_count_min)\n    values(  '{$shop_id}', '{$item_type}', '{$item_value_min}', '{$item_value_growth}', '{$item_value_growth_probability}','{$item_count_min}')";
    $req = mysql_query($query);
    if (!$req) {
        showError(__FILE__, __LINE__, __FUNCTION__, $query);
        exit;
    }
}
开发者ID:renlok,项目名称:PhaosRPG,代码行数:9,代码来源:shop_functions.php


示例12: _getRequest

 /**
  * 
  * @access private
  * @static
  * @return string
  */
 private static function _getRequest()
 {
     if (!Config::get('baseURL')) {
         showError('The baseURL is not defined on config file.', 'baseURL Not Defined', 500);
     }
     $url_path = parse_url(baseURL(), PHP_URL_PATH);
     $request = ltrim(rtrim(str_replace($url_path, '', $_SERVER['REQUEST_URI']), '/'), '/');
     return $request;
 }
开发者ID:khalid9th,项目名称:ocAds,代码行数:15,代码来源:Route.php


示例13: getcontnet

 /**
  * 获取远程数据
  * @access public
  * @param  $geturl string 远程请求URL
  * @return  String
  */
 public function getcontnet($url = '', $referer = '', $post = '', $cookie = '', $cookiejar = '')
 {
     if (empty($url)) {
         showError('缺少URL信息');
     }
     $curl = curl_init();
     curl_setopt($curl, CURLOPT_URL, $url);
     curl_setopt($curl, CURLOPT_TIMEOUT, 30);
     if (!$this->userAgent) {
         $this->userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20100101 Firefox/8.0';
     } else {
         $this->userAgent = 'Baiduspider+(+http://www.baidu.com/search/spider.htm)';
     }
     curl_setopt($curl, CURLOPT_USERAGENT, $this->userAgent);
     $post && ($this->post = $post);
     if (!$this->post) {
         curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type:application/x-www-form-urlencoded"));
         curl_setopt($curl, CURLOPT_ENCODING, 1);
         curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
     }
     curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
     //信息以文件流的形式返回,而不是直接输出。
     $referer && ($this->referer = $referer);
     if ($this->referer) {
         curl_setopt($curl, CURLOPT_REFERER, $this->referer);
     } else {
         curl_setopt($curl, CURLOPT_AUTOREFERER, 1);
     }
     if ($this->post) {
         curl_setopt($curl, CURLOPT_POST, 1);
         curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($this->post, '', '&'));
     } else {
         curl_setopt($curl, CURLOPT_POST, 0);
     }
     $cookie && ($this->cookie = $cookie);
     if ($this->cookie) {
         curl_setopt($curl, CURLOPT_COOKIE, $this->cookie);
     }
     $cookiejar && ($this->cookiejar = $cookiejar);
     if ($this->cookiejar) {
         $cookiepath = getcwd() . './' . $this->cookiejar;
         curl_setopt($curl, CURLOPT_COOKIEJAR, $cookiepath);
         curl_setopt($curl, CURLOPT_COOKIEFILE, $cookiepath);
     }
     curl_setopt($curl, CURLOPT_HEADER, 0);
     $content = curl_exec($curl);
     if (curl_errno($curl)) {
         $content = '';
         if (isset($_GET['debug'])) {
             echo '<pre><b>错误:</b><br />' . curl_error($curl);
         }
     }
     curl_close($curl);
     // }
     return $content;
 }
开发者ID:sdgdsffdsfff,项目名称:51jhome_customerservice,代码行数:62,代码来源:helper.class.php


示例14: requireMandatoryAttrGeneric

function requireMandatoryAttrGeneric($listsrc, $attr_id, $newval)
{
    $object_id = getBypassValue();
    $attrs = getAttrValues($object_id);
    if (array_key_exists($attr_id, $attrs) && considerGivenConstraint(spotEntity('object', $object_id), $listsrc) && !mb_strlen($newval)) {
        showError('Mandatory attribute "' . $attrs[$attr_id]['name'] . '" not set');
        stopOpPropagation();
    }
    return '';
}
开发者ID:dot-Sean,项目名称:racktables-contribs,代码行数:10,代码来源:mandatory_attr.php


示例15: dispatch

 public function dispatch()
 {
     global $debug_mode;
     if ($debug_mode) {
         printGenericException($this);
         return;
     }
     showError($this->message);
     redirectUser(buildRedirectURL('index', 'default'));
 }
开发者ID:ivladdalvi,项目名称:racktables,代码行数:10,代码来源:exceptions.php


示例16: index

 /**
  * 报表管理首页
  */
 function index()
 {
     //查询条件
     //专营店筛选
     $area = $this->input->get('area');
     $this->viewData['area'] = $area;
     $region = $this->input->get('region');
     $this->viewData['region'] = $region;
     $province = $this->input->get('province');
     $this->viewData['province'] = $province;
     $city = $this->input->get('city');
     $this->viewData['city'] = $city;
     $storeId = $this->input->get('storeId');
     $this->viewData['storeId'] = $storeId;
     $keyword = $this->input->get('keyword');
     $this->viewData['keyword'] = $keyword;
     //年份
     $year = $this->input->get('year');
     $year || ($year = $this->config->item('nowYear'));
     $this->viewData['year'] = $year;
     //时间单位
     $timeUnit = (int) $this->input->get('timeUnit');
     $timeUnit || ($timeUnit = $this->timeUnitModel->getNowTimeUnit());
     $this->viewData['timeUnit'] = $timeUnit;
     //数据类型
     $type = (int) $this->input->get('type');
     if (isset($_GET['submit']) && $_GET['submit'] == 'export') {
         isset($this->typeList[$type]) || showError('请选择正确的报表类型');
         //条件参数
         $params = array('area' => $area, 'region' => $region, 'province' => $province, 'city' => $city, 'storeId' => $storeId, 'keyword' => $keyword, 'year' => $year, 'timeUnit' => $timeUnit);
         //导出文件名
         $fileName = $this->typeList[$type] . '-' . $year . '年';
         if ($timeUnit) {
             $timeUnitList = $this->timeUnitModel->getCacheData('timeUnitList');
             isset($timeUnitList[$year][$timeUnit]) && ($fileName .= '-' . $timeUnitList[$year][$timeUnit]);
         }
         //设置excel文件下载头
         setExcelDownHeader($fileName);
         switch ($type) {
             case 1:
                 //专营店反馈报表
                 $this->getStoreProExcel($params);
                 break;
             case 2:
                 //专营店反馈明细报表
                 $this->getStoreProDetailExcel($params);
                 break;
         }
     } else {
         //面包屑
         $this->viewData['breadcrumb'][] = array('url' => printUrl('Report', 'index'), 'title' => '报表管理');
         $this->load->view('Report/index', $this->viewData);
     }
 }
开发者ID:zhaojianhui129,项目名称:implement2016,代码行数:57,代码来源:Report.php


示例17: addLog

 /**
  * 添加审核日志
  * @param int $type 审核类型
  * @param array $data 审核信息
  * @param array $user 用户信息
  * @return bool
  */
 function addLog($type, $data = array(), $user = array())
 {
     $data['type'] = $type;
     $data['targetId'] || showError('请输入目标审核ID');
     $data['auditRole'] || showError('请选择用户角色');
     $data['auditUid'] || showError('请输入审核用户ID');
     $data['auditRs'] || showError('请输入审核结果');
     isset($data['auditDes']) || showError('请设置审核备注');
     $data['createTime'] = time();
     return $this->add($data);
 }
开发者ID:zhaojianhui129,项目名称:qirmp2016,代码行数:18,代码来源:auditLogModel.php


示例18: checkPermission

 public static function checkPermission($groupid)
 {
     if (!$groupid || $groupid == 1) {
         return true;
     }
     self::getCacheFile();
     if (self::checkPublicModel() || self::checkGroupModel($groupid)) {
         return true;
     } else {
         showError('抱歉,您没有访问权限');
     }
 }
开发者ID:sdgdsffdsfff,项目名称:51jhome_customerservice,代码行数:12,代码来源:permission.class.php


示例19: close

 public function close()
 {
     if (getenv('SHOW_ERRORS') !== "true") {
         $error = error_get_last();
         if ($error && !in_array($error['type'], array(E_NOTICE, E_DEPRECATED))) {
             ob_end_clean();
             showError(500);
         } else {
             ob_end_flush();
         }
     }
 }
开发者ID:dieterpollier,项目名称:loxodo,代码行数:12,代码来源:App.php


示例20: detailCheck

 /**
  * 线下活动明细查看
  */
 function detailCheck()
 {
     $offlineCostNo = trim($this->input->get('offlineCostNo'));
     $offlineCostNo || showError('请选择活动明细');
     //查看类别
     $checkType = $this->input->get('checkType');
     in_array($checkType, array('budget', 'settle')) || ($checkType = 'budget');
     $this->viewData['checkType'] = $checkType;
     //线下活动明细列表
     $this->load->model('xPODetailModel');
     $this->viewData['offlineDetailList'] = $this->xPODetailModel->getNewList(array('offlineCostNo' => $offlineCostNo));
     $this->load->view('XunPOffline/detailCheck', $this->viewData);
 }
开发者ID:zhaojianhui129,项目名称:rmp2016,代码行数:16,代码来源:XunPOffline.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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