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


PHP errorLog函数代码示例

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


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

示例1: failRequest

function failRequest($message)
{
    errorLog("There was an error in the edit group request: " . $message);
    $response = array("success" => FALSE, "message" => $message);
    echo json_encode($response);
    exit;
}
开发者ID:benwhite10,项目名称:Smarkbook,代码行数:7,代码来源:updateSets.php

示例2: newWorksheetForGroup

function newWorksheetForGroup($staff, $setid, $worksheetid, $duedate, $level, $type)
{
    global $userid, $userval;
    $postData = array("type" => "NEW", "userid" => $userid, "userval" => $userval);
    if (isset($staff[0])) {
        $postData["staff"] = $staff[0];
    }
    if (isset($staff[1])) {
        $postData["addstaff1"] = $staff[1];
    }
    if (isset($staff[2])) {
        $postData["addstaff2"] = $staff[2];
    }
    if (isset($setid)) {
        $postData["set"] = $setid;
    }
    if (isset($worksheetid)) {
        $postData["worksheet"] = $worksheetid;
    }
    if (isset($duedate)) {
        $postData["datedue"] = $duedate;
    }
    $response = sendCURLRequest("/requests/setGroupWorksheet.php", $postData);
    $respArray = json_decode($response[1], TRUE);
    if ($respArray["result"]) {
        $gwid = $respArray["gwid"];
        // Go to page to enter the results
        header("Location: ../editSetResults.php?gwid={$gwid}");
        exit;
    } else {
        // Failure
        errorLog("Adding the new worksheet failed with error: " . $response[1]);
        returnToPageError("Something went wrong creating the new set of results.", $level, $type, $setid, $staff[0]);
    }
}
开发者ID:benwhite10,项目名称:Smarkbook,代码行数:35,代码来源:resultsEntry.php

示例3: returnToPageError

function returnToPageError($ex, $message)
{
    errorLog("There was an error in the get students request: " . $ex->getMessage());
    $response = array("success" => FALSE, "message" => $message . ": " . $ex->getMessage());
    echo json_encode($response);
    exit;
}
开发者ID:benwhite10,项目名称:Smarkbook,代码行数:7,代码来源:getStudents.php

示例4: failRequest

function failRequest($message)
{
    errorLog("There was an error in the get markbook request: " . $message);
    $response = array("success" => FALSE);
    echo json_encode($response);
    exit;
}
开发者ID:benwhite10,项目名称:Smarkbook,代码行数:7,代码来源:getMarkbook.php

示例5: failWithMessageAndException

function failWithMessageAndException($gwid, $message, $ex)
{
    $type = 'ERROR';
    $_SESSION['message'] = new Message($type, $message);
    $exMsg = $ex != null ? $ex->getMessage() : "";
    errorLog($message . " With exception: " . $exMsg);
    header("Location: ../editSetResults.php?gwid={$gwid}");
    exit;
}
开发者ID:benwhite10,项目名称:Smarkbook,代码行数:9,代码来源:updateResults.php

示例6: includeMVCView

 private function includeMVCView()
 {
     $controller = strtolower(Globals::getItem("controller"));
     $method = strtolower(Globals::getItem("method"));
     $filePath = BASE_DIR . "/Views/" . $controller . "/" . $method . ".php";
     $filePath = str_replace("\\", DIRECTORY_SEPARATOR, $filePath);
     if (!FileSystem::exists($filePath)) {
         errorLog("View not found for " . $controller . "/" . $method, 2);
     }
     self::includeRequestedView($filePath);
 }
开发者ID:akitech,项目名称:hooks-src,代码行数:11,代码来源:View.php

示例7: autoSavePostData

function autoSavePostData($id, $tableName, $fieldNameList)
{
    $sql = '';
    $sql = getPostSql($id, $tableName, $fieldNameList);
    //检测SQL
    if (checkSql($sql) == false) {
        errorLog('出错提示:<hr>sql=' . $sql . '<br>');
        return '';
    }
    //conn.execute(sql)			'checksql这一步就已经执行了不需要再执行了20160410
}
开发者ID:313801120,项目名称:AspPhpCms,代码行数:11,代码来源:2016_SaveData.php

示例8: returnToPageError

function returnToPageError($message)
{
    $type = 'ERROR';
    if (isset($_SESSION['user'])) {
        $user = $_SESSION['user'];
        $userid = $user->getUserId();
        $msg = "User {$userid} was unable to switch users as the id was not correctly set.";
        errorLog($msg);
    }
    $_SESSION['message'] = new Message($type, $message);
    header("Location: ../switchUser.php");
    exit;
}
开发者ID:benwhite10,项目名称:Smarkbook,代码行数:13,代码来源:switch_user.php

示例9: execute

 public function execute()
 {
     if (!function_exists("curl_init")) {
         errorLog("CURL is required. Please install.", 3);
     }
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $this->url);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     curl_setopt($ch, CURLOPT_HEADER, $this->headers);
     $output = curl_exec($ch);
     curl_close($ch);
     return $output;
 }
开发者ID:akitech,项目名称:hooks-src,代码行数:13,代码来源:Curl.php

示例10: errorDisplay

function errorDisplay()
{
    $e = error_get_last();
    if (!is_array($e) || !in_array($e['type'], array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR))) {
        return;
    }
    echo "Application Error\n";
    if (getenv('BLUZ_DEBUG')) {
        echo $e['message'] . "\n";
        echo $e['file'] . "#" . $e['line'] . "\n";
    }
    // try to write log
    errorLog($e['message'], $e['file'] . "#" . $e['line']);
    exit(1);
}
开发者ID:dezvell,项目名称:skeleton,代码行数:15,代码来源:cli.php

示例11: parseFields

 public static function parseFields(array $fields, $required = true, $implode = true)
 {
     $data = [];
     foreach ($fields as $field) {
         if ($required && !Request::isItemSet($field)) {
             errorLog("Invalid request for parse field : " . $field, 1);
         }
         $item = Request::getItem($field);
         if (is_array($item)) {
             $item = implode(",", $item);
         }
         $data[$field] = $item;
     }
     return $data;
 }
开发者ID:akitech,项目名称:hooks-src,代码行数:15,代码来源:Etc.php

示例12: handle_error

function handle_error($errno, $errstr, $errfile, $errline, $errcontext)
{
    // timestamp for the error entry
    $dt = date("Y-m-d H:i:s");
    // Make log entries
    $errortype = array(E_ERROR => 'Error', E_WARNING => 'Warning', E_PARSE => 'Parsing Error', E_NOTICE => 'Notice', E_CORE_ERROR => 'Core Error', E_CORE_WARNING => 'Core Warning', E_COMPILE_ERROR => 'Compile Error', E_COMPILE_WARNING => 'Compile Warning', E_USER_ERROR => 'User Error', E_USER_WARNING => 'User Warning', E_USER_NOTICE => 'User Notice', E_STRICT => 'Runtime Notice', E_RECOVERABLE_ERROR => 'Catchable Fatal Error');
    $error_msg = array("DT" => $dt, "E_NO" => $errno, "T" => $errortype, "E" => $errstr, "F" => $errfile, "L" => $errline);
    //$error_msg = "[$dt] $errortype[$errno] $errstr in $errfile at $errline";
    errorLog("{$error_msg}\n");
    //Critical errors
    $critical_errors = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_USER_ERROR);
    if (in_array($errno, $critical_errors)) {
        error_log($error_msg, 1, "smsgyan@innoz.in");
        terminate($error_msg);
    }
}
开发者ID:superego546,项目名称:SMSGyan,代码行数:16,代码来源:main_functions.php

示例13: errorDisplay

function errorDisplay()
{
    if (!($e = error_get_last())) {
        return;
    }
    if (!is_array($e) || !in_array($e['type'], array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR))) {
        return;
    }
    // clean all buffers
    while (ob_get_level()) {
        ob_end_clean();
    }
    // try to write log
    errorLog($e['message'], $e['file'] . "#" . $e['line']);
    // display error page
    require_once 'error.php';
}
开发者ID:dezvell,项目名称:skeleton,代码行数:17,代码来源:index.php

示例14: connect

 function connect()
 {
     static $dbh;
     global $addon;
     $db_params = $addon->callHook('db_params');
     $dbh = mysql_connect($db_params['db_read_host'], $db_params['db_read_user'], $db_params['db_read_pass']);
     if (!$dbh) {
         errorLog("Failed attempt to connect to server - aborting.");
         exitTo("/error.php?errNo=101301", "error: 101301 - data server can not be found");
     }
     $database = $db_params['db_read_name'];
     if (isset($database)) {
         if (!mysql_select_db($database)) {
             errorLog("Failed attempt to open database: {$database} - aborting \n\t" . mysql_error());
             exitTo("/error.php?errNo=101303", "error: 101303 - unknown database name");
         }
     }
     return $dbh;
 }
开发者ID:joklaps,项目名称:mytourbook,代码行数:19,代码来源:dbconnection.class.php

示例15: returnToPageError

function returnToPageError($message)
{
    $type = 'ERROR';
    errorLog($message);
    $_SESSION['message'] = new Message($type, $message);
    $_SESSION['formValues'] = $GLOBALS["informationArray"];
    header("Location: ../addNewWorksheet.php");
    exit;
}
开发者ID:benwhite10,项目名称:Smarkbook,代码行数:9,代码来源:addNewWorksheet.php


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