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

PHP getError函数代码示例

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

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



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

示例1: escribirError

/**
 * Devuelve el error del campo pedido con el formato requerido.
 * @param unknown $field
 * @return string
 */
function escribirError($field)
{
    $error_dado = getError($field);
    if ($error_dado) {
        return '<span class="error">' . $error_dado . '</span>';
    }
}
开发者ID:alexpowerup,项目名称:DWES_Practica_1,代码行数:12,代码来源:error_management.php


示例2: getSettingValue

/**
 * Gets setting value from config.xml file.
 * @param sWidget - widget's name.
 * @param $sSettingKey - setting's key.
 */
function getSettingValue($sWidget, $sSettingKey, $sFile = "config", $bFullReturn = false, $sFolder = "xml")
{
    global $sModulesPath;
    global $aXmlTemplates;
    global $aErrorCodes;
    //--- Read file ---//
    $sWidgetFile = $sWidget . "/" . $sFolder . "/" . $sFile . ".xml";
    $sFileName = $sModulesPath . $sWidgetFile;
    if (!file_exists($sFileName)) {
        if ($bFullReturn) {
            return array('value' => getError($aErrorCodes[1], $sWidgetFile), 'status' => FAILED_VAL);
        } else {
            return "";
        }
    }
    $sConfigContents = makeGroup("", "items");
    if (($rHandle = @fopen($sFileName, "rt")) !== false && filesize($sFileName) > 0) {
        $sConfigContents = fread($rHandle, filesize($sFileName));
        fclose($rHandle);
    }
    //--- Update info ---//
    $sValue = xmlGetValue($sConfigContents, "item", $sSettingKey);
    if ($bFullReturn) {
        return array('value' => $sValue, 'status' => SUCCESS_VAL);
    } else {
        return $sValue;
    }
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:33,代码来源:apiFunctions.inc.php


示例3: update

 /**
  * Update
  */
 public function update($data)
 {
     extract($data);
     $stmt = $this->db->prepare("UPDATE `agreement` SET content = :content WHERE id = 1");
     $stmt->bindParam(':content', $agreement, PDO::PARAM_STR);
     getError($stmt);
     $stmt->execute();
 }
开发者ID:slim12kg,项目名称:Anastat,代码行数:11,代码来源:Condition.php


示例4: addnew

 /**
  * Add new 
  */
 public function addnew($array)
 {
     extract($array);
     $query = $this->db->prepare('INSERT INTO `databases` (databasename,shortcode,type,help) VALUES (:databasename,:shortcode,:type,:help)');
     $query->bindParam(':databasename', $database, PDO::PARAM_STR);
     $query->bindParam(':shortcode', $code, PDO::PARAM_STR);
     $query->bindParam(':type', $type, PDO::PARAM_INT);
     $query->bindParam(':help', $help, PDO::PARAM_STR);
     $query->execute();
     getError($query);
 }
开发者ID:slim12kg,项目名称:Anastat,代码行数:14,代码来源:Database.php


示例5: AjaxController_sendResponse

/**
 * Handle error code from modules and send textual message if needed
 */
function AjaxController_sendResponse($errorCode, $onSuccess)
{
    if ($errorCode < 0) {
        $status = 'error';
        $message = getMessage(getError($errorCode));
    } else {
        $status = 'success';
        $message = getMessage($onSuccess);
    }
    echo json_encode(['status' => $status, 'message' => $message]);
}
开发者ID:Archerol,项目名称:booking,代码行数:14,代码来源:ajax.php


示例6: ByAffiliate

 public function ByAffiliate($id)
 {
     $stmt = $this->db->query("SELECT affiliates.affiliate_name,MONTHNAME(requests.created_at) AS month,YEAR(requests.created_at) as year,\n\t\t\t\t\t\t\t\t\t clients.name,COUNT(*) as requests\n\t\t\t\t\t\t\t \t\t FROM `clients`\n\t\t\t\t\t\t\t\t\t INNER JOIN affiliates ON clients.affiliate_id = affiliates.id\n                                     INNER JOIN requests ON  clients.id = requests.client_id\n                                     WHERE clients.affiliate_id = '{$id}'\n\t\t\t\t\t\t\t\t\t GROUP BY YEAR(requests.created_at),MONTH(requests.created_at) \n\t\t\t\t\t\t\t\t\t ORDER BY affiliates.affiliate_name ,requests.created_at ASC\n\t\t\t\t\t\t\t\t\t ");
     $stmt->setFetchMode(\PDO::FETCH_ASSOC);
     //If PDO error
     getError($stmt);
     while ($result = $stmt->fetch()) {
         $this->results[] = $result;
     }
     return (is_null($this->results) or empty($this->results)) ? array() : $this->results;
 }
开发者ID:slim12kg,项目名称:Anastat,代码行数:11,代码来源:Report.php


示例7: update

 /**
  * Update
  */
 public function update($data)
 {
     extract($data);
     $stmt = $this->db->prepare("UPDATE `contact` SET address = :address,contact = :contact,facebook = :facebook,twitter = :twitter,google = :google WHERE id = 1");
     $stmt->bindParam(':address', $address, PDO::PARAM_STR);
     $stmt->bindParam(':contact', $contact, PDO::PARAM_STR);
     $stmt->bindParam(':facebook', $facebook, PDO::PARAM_STR);
     $stmt->bindParam(':twitter', $twitter, PDO::PARAM_STR);
     $stmt->bindParam(':google', $google, PDO::PARAM_STR);
     getError($stmt);
     $stmt->execute();
 }
开发者ID:slim12kg,项目名称:Anastat,代码行数:15,代码来源:Contact.php


示例8: lists

 /**
  * Fetch all tables for
  * a database
  **/
 public function lists()
 {
     $this->cutOffExpiredAffiliate();
     $stmt = $this->db->query("SELECT * FROM `affiliates` LEFT JOIN affiliate_plan\n\t\t\t\t\t\t\t\t  ON affiliates.id = affiliate_plan.affiliate_id \n\t\t\t\t\t\t\t\t  ORDER BY affiliate_name");
     $stmt->setFetchMode(\PDO::FETCH_ASSOC);
     //If PDO error
     getError($stmt);
     while ($result = $stmt->fetch()) {
         $this->results[] = $result;
     }
     // var_dump($this->results);
     return (is_null($this->results) or empty($this->results)) ? array() : $this->results;
 }
开发者ID:slim12kg,项目名称:Anastat,代码行数:17,代码来源:Affiliate.php


示例9: set_error

function set_error($error, $tolink, $act = false, $error_sta = "error")
{
    //Establecemos en sesion el error
    if (empty($error)) {
        return false;
    }
    if ($act) {
        $sess_array = array('Error' => array('titulo' => 'Error!', 'mensaje' => $error), 'Error_Sta' => $error_sta);
    } else {
        $sess_array = array('Error' => getError($error), 'Error_Sta' => $error_sta);
    }
    $CI =& get_instance();
    $CI->session->set_userdata($sess_array);
    redirect(base_url($tolink));
}
开发者ID:alfa5,项目名称:SKServer,代码行数:15,代码来源:notify_helper.php


示例10: getError

function getError($edu, $kirjutamisel, int $i)
{
    $edu = ucword($edu);
    $vahe = $i++;
    $summa = $edu + $kirjutamisel;
    $mingiTehe = $edu - $vahe + $edu;
    echo $summa . " ei tea midagi";
    $edu = mb_strtolower($edu);
    if ($i > 0) {
        $i = -10;
        $edu = getError($i, $kirjutamisel);
        $edu = ucfirst . getError;
    }
    return $edu;
}
开发者ID:piiskop,项目名称:pstk,代码行数:15,代码来源:kambaYlesanne2.php


示例11: log_error

 function log_error($error_code, $model = '')
 {
     $CI =& get_instance();
     # ensure we have an array in the $response object to hold our error
     if (!empty($CI->response)) {
         if (!isset($CI->response->errors) or is_null($CI->response->errors)) {
             $CI->response->errors = array();
         }
     }
     # this object will hold this specific error data and be added to the above array at the end
     $error = new stdClass();
     $error->code = $error_code;
     $error->file = 'system';
     $error->model = $model;
     if (function_exists('getError')) {
         $error = getError($error->code);
         $error->message = $error->title;
     }
     // log the details of the error to the log file
     stdlog($error);
     if (!empty($error->controller) and !empty($eror->function)) {
         $error->controller = $error->controller . '::' . $error->function;
     } else {
         $error->controller = '';
     }
     unset($error->function);
     // if the error is severe enough, set the error in the response object
     if (isset($error->severity) and $error->severity <= 3) {
         error_reporting(E_ALL);
         unset($error->file);
         # we don't care about where this was logged (into which file)
         unset($error->message);
         # this is for logging only and is already contained in the $error->title
         $error->link = $CI->config->config['oa_web_folder'] . '/index.php/errors/' . $error->code;
         if (!empty($CI->response)) {
             $CI->response->errors[] = $error;
             $CI->response->meta->header = $error->status;
         }
     }
 }
开发者ID:Opmantek,项目名称:open-audit,代码行数:40,代码来源:log_helper.php


示例12: ejecutar_consulta

function ejecutar_consulta($consulta)
{
    $mysqli = conexion();
    if (!$mysqli) {
        return getError($mysqli);
    }
    $result = mysqli_query($mysqli, $consulta);
    if ($result) {
        if (mysqli_num_rows($result) > 0) {
            $datos = array();
            while ($row = mysqli_fetch_assoc($result)) {
                $datos[] = $row;
            }
            mysqli_free_result($result);
            mysqli_close($mysqli);
            return $datos;
        }
    }
    mysqli_free_result($result);
    mysqli_close($mysqli);
    return mysqli_errno($mysqli);
}
开发者ID:luis721,项目名称:minutos_,代码行数:22,代码来源:functions.php


示例13: __construct

 public function __construct()
 {
     parent::__construct();
     // log the attempt
     stdlog();
     # ensure our URL doesn't have a trailing / as this may break image (and other) relative paths
     $this->load->helper('url');
     if (strrpos($_SERVER['REQUEST_URI'], '/') === strlen($_SERVER['REQUEST_URI']) - 1) {
         redirect(uri_string());
     }
     $this->load->helper('network');
     $this->load->helper('output');
     $this->load->helper('error');
     $this->load->helper('input');
     $this->load->model('m_devices');
     $this->load->model('m_orgs');
     inputRead();
     $this->output->url = $this->config->item('oa_web_index');
     if ($this->response->meta->id != '') {
         $access_level = $this->m_devices->get_user_device_org_access();
         if ($access_level < 1) {
             // we should determine if the device does actually exist or not
             // then we can throw the correct status code of 404 or 403
             $sql = "SELECT system.id FROM system WHERE system.id = ?";
             $data = array($this->response->meta->id);
             $query = $this->db->query($sql, $data);
             $result = $query->result();
             if (count($result) == 0) {
                 $this->response->errors[] = getError('ERR-0007');
             } else {
                 $this->response->errors[] = getError('ERR-0008');
             }
             $this->response->meta->header = $this->response->errors[0]->status;
             output($this->response);
             exit;
         }
     }
 }
开发者ID:Opmantek,项目名称:open-audit,代码行数:38,代码来源:devices.php


示例14: addEventListener

    <link href="css/login.css" rel='stylesheet' type='text/css' />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
    <title>ccms Admin Login</title>
</head>

<body>

<div class="main">
    <div style="text-align: center;">
        <img src="images/ccms.png" height="250" class="img-responsive" alt="ccms">
    </div>
    <div class="login">
        <div class="error">
            <?php 
getError($i, _e('wrong_username_password', '', '', true));
?>
        </div>
        <div class="inset">
            <!-----start-main---->
            <form action="" method="POST">
                <div>
                    <span><label>Username</label></span>
                    <span><input type="text" class="textbox" placeholder="<?php 
_e('username');
?>
" name="username" required></span><!--id="active"-->
                </div>
                <div>
                    <span><label>Password</label></span>
                    <span><input type="password" class="password" placeholder="<?php 
开发者ID:VSG24,项目名称:ccms,代码行数:31,代码来源:login.php


示例15: update

 /**
  * Update table details
  */
 public function update($data)
 {
     extract($data);
     $stmt = $this->db->prepare("UPDATE `tables` SET table_name = :table ,code = :code WHERE id = :table_id");
     $stmt->bindParam(':table', $table, PDO::PARAM_STR);
     $stmt->bindParam(':code', $code, PDO::PARAM_STR);
     $stmt->bindParam(':table_id', $table_id, PDO::PARAM_INT);
     getError($stmt);
     $stmt->execute();
 }
开发者ID:slim12kg,项目名称:Anastat,代码行数:13,代码来源:Table.php


示例16: header

    header("Location: logout.php");
    exit;
}
require_once dirname(dirname(dirname(__FILE__))) . '/functions.php';
// require_once(dirname(__file__) . '/functions.php');
require_once dirname(dirname(__FILE__)) . '/wp-load.php';
date_default_timezone_set('Asia/Tokyo');
$queryList = getSQLQuery(getPDO());
$censorList = getCensorList(getPDO(), $queryList["SELECT_CENSOR"]);
$regexList = getRegex(getPDO(), $queryList["SELECT_REGEX"]);
$fixedList = getFix(getPDO(), $queryList["SELECT_FIX"]);
$procLockData = getProcLockData(getPDO(), $queryList["SELECT_PROCLOCK"]);
$threadData = getThreadDataAll(getPDO(), $queryList["SELECT_THREAD_FOR_SUSPEND"]);
$threadDataCount = count($threadData);
$nonce = wp_create_nonce();
$error = getError(getPDO(), $queryList["SELECT_ERROR"]);
?>

<!DOCTYPE html>
<html>
<head>
<title>StealSystem</title>
<meta name="viewport" content="width=device-width">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="<?php 
echo $fixedList["scriptUrl"];
?>
/js/matome.js"></script>
<link rel="stylesheet" type="text/css" href="style.css"> 
<script>
<?php 
开发者ID:pecodrive,项目名称:stealsystem,代码行数:31,代码来源:suspend.php


示例17: updateSector

 /**
  * Update table details
  */
 public function updateSector($data)
 {
     extract($data);
     $stmt = $this->db->prepare("UPDATE `sectors` SET name = :name WHERE id = :id");
     $stmt->bindParam(':name', $name, PDO::PARAM_STR);
     $stmt->bindParam(':id', $id, PDO::PARAM_INT);
     getError($stmt);
     $stmt->execute();
 }
开发者ID:slim12kg,项目名称:Anastat,代码行数:12,代码来源:Survey.php


示例18: getFileContents

/**
 * gets file contents
 * @param sWidget - the name of the widget.
 * @param sCase - skins/langs
 */
function getFileContents($sWidget, $sFile, $bArray = false)
{
    global $sModulesPath;
    global $aErrorCodes;
    $sFile = $sWidget . $sFile;
    $sFileName = $sModulesPath . $sFile;
    if (!file_exists($sFileName)) {
        return array('value' => getError($aErrorCodes[1], $sFile), 'status' => FAILED_VAL, 'contents' => $bArray ? array() : "");
    }
    $rHandle = fopen($sFileName, "rt");
    $iFileSize = filesize($sFileName);
    $sContents = $iFileSize > 0 ? fread($rHandle, filesize($sFileName)) : makeGroup("", "items");
    fclose($rHandle);
    $aContents = xmlGetValues($sContents, "item");
    return array('value' => "", 'status' => SUCCESS_VAL, 'contents' => $bArray ? $aContents : $sContents);
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:21,代码来源:functions.inc.php


示例19: switch

    You should have received a copy of the GNU General Public License
    along with Cybermin; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

 2006 Namont Nicolas
 

  include/admin_form_inter.php V0.1
*/
// Formulaire de creation d'une intervention
switch ($_GET["error"]) {
    case 1:
        echo getError(4);
        break;
    case 2:
        echo getError(0);
        break;
}
?>
<div class="row">
<section class="col-lg-7 connectedSortable">

<form method="post" action="index.php?a=3" role="form">
<div class="box box-success"><div class="box-header"><h3 class="box-title">Détail de l'intervention</h3></div>
	<div class="box-body">
	
	<div class="form-group"><label>Titre</label>
        <input type="text" name="titr" class="form-control"></div>
    
    <div class="form-group"><label>Date*</label>
        <input type="text" name="date" style="width:100px;" maxlength="10" class="form-control" value="<?php 
开发者ID:ctariel,项目名称:CyberGestionnaireLGB,代码行数:31,代码来源:admin_form_inter.php


示例20: htmlspecialchars

        if (is_array($url)) {
            $htmlurl = $url[0];
            if (array_search($uri, $url) !== false || array_search($_SERVER['REQUEST_URI'], $url) !== false) {
                $active = ' class="active"';
            }
        } else {
            $htmlurl = htmlspecialchars($url);
            if ($url == $uri || $SETTINGS['path'] . $url == $_SERVER['REQUEST_URI']) {
                $active = ' class="active"';
            }
        }
        $navbar .= "<li{$active}><a href=\"{$SETTINGS['path']}{$htmlurl}\">{$htmlname}</a></li>\n";
    }
    $navbar .= '</ul>';
}
$error = getError();
$warning = false;
$info = getInfo();
$boxes = '';
if ($error !== false) {
    $error_html = htmlspecialchars($error, 0, 'UTF-8');
    $boxes .= "<p class=\"error\"><img src=\"{$SETTINGS['path']}/images/icons/error.png\" alt=\"Fehler:\" /> {$error_html}</p>\n";
}
if ($warning !== false) {
    $warning_html = htmlspecialchars($warning, 0, 'UTF-8');
    $boxes .= "<p class=\"warning\"><img src=\"{$SETTINGS['path']}/images/icons/error.png\" alt=\"Warnung:\" /> {$warning_html}</p>\n";
}
if ($info !== false) {
    $info_html = htmlspecialchars($info, 0, 'UTF-8');
    $boxes .= "<p class=\"info\"><img src=\"{$SETTINGS['path']}/images/icons/information.png\" alt=\"Information:\" /> {$info_html}</p>\n";
}
开发者ID:hackyourlife,项目名称:evoc,代码行数:31,代码来源:template.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getErrorMessage函数代码示例发布时间:2022-05-15
下一篇:
PHP getEnv函数代码示例发布时间: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