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


PHP Error::showError方法代码示例

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


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

示例1: query

 public function query($keyword, $index)
 {
     if ($error = $this->error()) {
         Error::showError($error, 3003);
     }
     $index = empty($index) ? '*' : $index;
     return self::$sphinx->query($keyword, $index);
 }
开发者ID:freedream520,项目名称:Psearch,代码行数:8,代码来源:Sphinx.php

示例2: filterParam

 public function filterParam()
 {
     $data = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
     unset($_GET, $_POST, $_SESSION, $_SERVER, $_COOKIE, $_FILES);
     $json = json_decode($data, true);
     if ($json) {
         return $json;
     } else {
         Error::showError("POST DATA EMPTY", 1001);
     }
 }
开发者ID:freedream520,项目名称:Psearch,代码行数:11,代码来源:Core.php

示例3: execute

 public function execute($sql)
 {
     $this->connect();
     $result = mysql_query($sql, $this->dblink);
     if ($result == false) {
         Error::showError("Mysql Execute Error:" . mysql_error($this->dblink), 2004);
     } else {
         $numrows = mysql_affected_rows($this->dblink);
         $last_insid = mysql_insert_id($this->dblink);
         return $last_insid ? $last_insid : $numrows;
     }
 }
开发者ID:freedream520,项目名称:Psearch,代码行数:12,代码来源:DbMysql.php

示例4: renderTemplate

 /**
  * return absolute path to selected template directory
  * @param  string  $path  path to file from views folder
  * @param  array   $data  array of data
  * @param  string  $custom path to template folder
  */
 public static function renderTemplate($path, $data = false, $custom = false)
 {
     self::init();
     if (!headers_sent()) {
         foreach (self::$headers as $header) {
             header($header, true);
         }
     }
     $file = "app/Templates/" . \HMC\Config::SITE_TEMPLATE() . "/{$path}.php";
     if ($custom == false) {
         if (file_exists($file)) {
             require $file;
         } else {
             Logger::error('File (' . $file . ') was not found.');
             Error::showError(500);
             die;
         }
     } else {
         require "app/Templates/{$custom}/{$path}.php";
     }
 }
开发者ID:hmc-soft,项目名称:mvc,代码行数:27,代码来源:View.php

示例5: die

<?php

if (@$magic != "0xDEADBEEF") {
    die("This file cannot be executed directly");
}
if (@is_dir("setup")) {
    $error = new Error("Setup directory exists. You either haven't installed your guestbook, or forgot to delete the setup folder.");
    die($error->showError());
}
if (!file_exists("data.php")) {
    $error = new Error("Data file doesn't exist. Have you installed your guestbook yet?");
    die($error->showError());
}
require_once 'configuration.php';
if ($config['offline']) {
    $error = new Error($config['offlineMessage']);
    die($error->showError());
}
include_once 'classes/mobile/mobile.class.php';
if (Mobile::isMobile($_SERVER['HTTP_USER_AGENT'])) {
    $config['guestbookTheme'] = $config['mobileTheme'];
}
开发者ID:adelnoureddine,项目名称:angora-guestbook,代码行数:22,代码来源:checks.php

示例6: _getSegmentParamFile

 function _getSegmentParamFile($segment)
 {
     $filePath = $this->_getCustomSegmentParamFile($segment);
     if (!is_file($filePath)) {
         Error::showError("切片数据文件 " . $segment . " 不存在");
     }
     return $filePath;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:8,代码来源:layout.class.php

示例7: _check

 /**
  * 检查初始化配置是否定义
  */
 function _check()
 {
     if (!defined('APP_VIEWER') || !defined('APP_CONTROLLER')) {
         Error::showError("you shoule config APP_VIEWER|APP_CONTROLLER");
     }
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:9,代码来源:router.class.php

示例8: field

 public function field($table)
 {
     if (empty($this->field)) {
         Error::showError('Field Empty', 1005);
     }
     $newField = array();
     $index = Config::$index;
     $cfield = $index[$table];
     foreach ($this->field as $k => $v) {
         if (isset($cfield[$k])) {
             $newField[$k] = $v;
         }
     }
     return $newField;
 }
开发者ID:freedream520,项目名称:Psearch,代码行数:15,代码来源:Module.php


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