本文整理汇总了PHP中errorLog函数的典型用法代码示例。如果您正苦于以下问题:PHP errorLog函数的具体用法?PHP errorLog怎么用?PHP errorLog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了errorLog函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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, "[email protected]");
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
示例16: prepareFromImageType
private function prepareFromImageType()
{
if (!function_exists("imagecreatefromjpeg") || !function_exists("imagecreatefromgif") || !function_exists("imagecreatefrompng")) {
errorLog("GD Image Library (imagecreatefrom...) is required. Please install.", 3);
}
switch ($this->imageType) {
case "image/jpeg":
$this->thumb = imagecreatefromjpeg($this->path);
//jpeg file
break;
case "image/gif":
$this->thumb = imagecreatefromgif($this->path);
//gif file
break;
case "image/png":
$this->thumb = imagecreatefrompng($this->path);
//png file
break;
default:
die("Only jpeg, png and gif is supported");
break;
}
}
开发者ID:akitech,项目名称:hooks-src,代码行数:23,代码来源:Image.php
示例17: sendAWeber
function sendAWeber($mailSubscribe)
{
if (defined('AW_AUTHCODE') && defined('AW_LISTNAME')) {
$token = 'api_aweber/' . substr(AW_AUTHCODE, 0, 10);
if (!file_exists($token)) {
try {
$auth = AWeberAPI::getDataFromAweberID(AW_AUTHCODE);
file_put_contents($token, json_encode($auth));
} catch (AWeberAPIException $exc) {
errorLog("AWeber", "[" . $exc->type . "] " . $exc->message . " Docs: " . $exc->documentation_url);
throw new Exception("Authorization error", 5);
}
}
if (file_exists($token)) {
$key = file_get_contents($token);
}
list($consumerKey, $consumerSecret, $accessToken, $accessSecret) = json_decode($key);
$aweber = new AWeberAPI($consumerKey, $consumerSecret);
try {
$account = $aweber->getAccount($accessToken, $accessSecret);
$foundLists = $account->lists->find(array('name' => AW_LISTNAME));
$lists = $foundLists[0];
$params = array('email' => $mailSubscribe, 'name' => getName($mailSubscribe));
if (isset($lists)) {
$lists->subscribers->create($params);
} else {
errorLog("AWeber", "List is not found");
throw new Exception("Error found Lists", 4);
}
} catch (AWeberAPIException $exc) {
if ($exc->status == 400) {
throw new Exception("Email exist", 2);
} else {
errorLog("AWeber", "[" . $exc->type . "] " . $exc->message . " Docs: " . $exc->documentation_url);
}
}
}
}
开发者ID:johnmrobinson,项目名称:johnmrobinson.github.io,代码行数:38,代码来源:subscribe.php
示例18: exit
if (!is_dir($errorDir)) {
exit('不能建立目录!');
}
}
$wishProductApi = new WishProductApi('geshan0728', 1);
$num = 0;
foreach ($files as $fileKey => $fileVal) {
$spuInfo = explode('.', $fileVal);
$spuSn = $spuInfo[0];
if (!empty($spuArr)) {
if (!in_array($spuSn, $spuArr)) {
echo $spuSn, ':没有料号信息', PHP_EOL;
continue;
}
}
errorLog('开始上传,' . $spuSn, 'tip');
$sql = 'select spuSn from `ws_wait_publish` where spuSn = "' . $spuSn . '"';
$query = $dbConn->query($sql);
$ret = $dbConn->fetch_array_all($query);
if (!empty($ret)) {
//已经上传过此商品
echo $spuSn, ', 此料号已经记录到数据库中,不需要再记录', PHP_EOL;
//rename($logPath.$fileVal, $errorDir.$spuSn.'.log');
continue;
}
$price = spuPrice($spuSn);
$productInfo = readProductInfo($spuSn);
if (empty($productInfo)) {
echo '没有数据', PHP_EOL;
rename($logPath . $fileVal, $errorDir . $spuSn . '.log');
continue;
开发者ID:ulpyuxa,项目名称:wishorder.wishtool.com,代码行数:31,代码来源:test_insertProduct.php
示例19: mysql_connect
$conn = mysql_connect($SQLHOST, $SQLUSER, $SQLPASS);
if (!$conn) {
errorLog('Could not connect: ' . mysql_error(), true);
}
$db_selected = mysql_select_db($SQLDB, $conn);
if (!$db_selected) {
errorLog('Can\'t use ' . $SQLDB . ' : ' . mysql_error(), true);
}
// Separando detail traps
$traps_array = explode('*', $trap_ret['detail']);
$string = print_r($traps_array, 1);
errorLog($string);
if ($traps_array[1] != 'DISP') {
$insert_sql = "INSERT INTO `{$SQLTBL}` (`id_traps`, `FECHA_HORA`, `ENCABEZADO`, `RUT`, `NODO`, `CUADRANTE`, `HOST`, `GROUP`, `OID`, `TIPO`, `VALORESPERADO`, `VALOROBTENIDO`, `LOGIN`) VALUES ";
$values_sql = "(NULL,NOW(),'{$traps_array['0']}','{$traps_array['1']}','{$traps_array['2']}','{$traps_array['3']}','{$traps_array['5']}','{$traps_array['6']}','{$traps_array['7']}','{$traps_array['8']}','{$traps_array['9']}','{$traps_array['10']}','{$traps_array['11']}');";
$result = mysql_query($insert_sql . $values_sql);
if (!$result) {
errorLog('Invalid query: ' . mysql_error(), true);
}
} else {
$traps_dips_array1 = explode('_', $traps_array[2]);
$string = print_r($traps_dips_array1, 1);
errorLog($string);
$insert_sql = "INSERT INTO `{$SQLTBL}` (`FECHA_HORA`, `ENCABEZADO`, `TRAPCRIT`, `RDB`, `RUT`, `NODO`, `CUADRANTE`, `COMUNA` , `HOST`, `DNS`, `GROUP`, `PLAN`, `OID`, `TIPO`, `VALORESPERADO`, `VALOROBTENIDO`, `LOGIN`) VALUES ";
$values_sql = printf("(NOW(),%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)", $traps_array[0], $traps_dips_array1[0], $traps_dips_array1[1], $traps_dips_array1[2], $traps_dips_array1[3], $traps_dips_array1[4], $traps_dips_array1[5], '', $traps_dips_array1[6], '', $traps_dips_array1[7], $trap_ret['key'], $traps_array[1], '1', '0', $traps_array[3]);
$result = mysql_query($insert_sql . $values_sql);
if (!$result) {
errorLog('Invalid query: ' . mysql_error(), true);
}
}
mysql_close($conn);
开发者ID:rafaelurrutia,项目名称:bmonitor-y-bi,代码行数:31,代码来源:getTrap.php
示例20: XY_AP_GeneralList
function XY_AP_GeneralList($action, $tableName, $addSql)
{
$title = '';
$topNumb = '';
$nTop = '';
$isB = '';
$sql = '';
$columnName = '';
$columnEnName = '';
$aboutcontent = '';
$bodyContent = '';
$showTitle = '';
$bannerImage = '';
$smallImage = '';
$bigImage = '';
$id = '';
$defaultStr = '';
$i = '';
$j = '';
$s = '';
$c = '';
$startStr = '';
$endStr = '';
$url = '';
$noFollow = '';
//不追踪 20141222
$defaultStr = getDefaultValue($action);
//获得默认内容
$modI = '';
//余循环20150112
$noFollow = aspTrim(lCase(RParam($action, 'noFollow')));
//不追踪
$lableTitle = '';
//标题标题
$target = '';
//a链接打开目标方式
$adddatetime = '';
//添加时间
$isFocus = '';
$fieldNameList = '';
//字段列表
$abcolorStr = '';
//A加粗和颜色
$atargetStr = '';
//A链接打开方式
$atitleStr = '';
//A链接的title20160407
$anofollowStr = '';
//A链接的nofollow
$splFieldName = '';
$fieldName = '';
$replaceStr = '';
$k = '';
$idPage = '';
$tableName = lCase($tableName);
//转小写
$fieldNameList = getHandleFieldList($GLOBALS['db_PREFIX'] . $tableName, '字段列表');
$splFieldName = aspSplit($fieldNameList, ',');
$topNumb = RParam($action, 'topNumb');
$nTop = $topNumb;
if ($nTop != '') {
$nTop = CInt($nTop);
} else {
$nTop = 999;
}
if ($sql == '') {
if ($topNumb != '') {
$topNumb = ' top ' . $topNumb . ' ';
}
$sql = 'Select ' . $topNumb . '* From ' . $GLOBALS['db_PREFIX'] . $tableName;
}
//追加sql
if ($addSql != '') {
$sql = getWhereAnd($sql, $addSql);
}
$sql = replaceGlobleVariable($sql);
//替换全局变量
//检测SQL
if (checkSql($sql) == false) {
errorLog('出错提示:<br>action=' . $action . '<hr>sql=' . $sql . '<br>');
return '';
}
$rsObj = $GLOBALS['conn']->query($sql);
for ($i = 1; $i <= @mysql_num_rows($rsObj); $i++) {
$rs = mysql_fetch_array($rsObj);
$startStr = '';
$endStr = '';
//call echo(sql,i & "," & nTop)
if ($i > $nTop) {
break;
}
//#【PHP】$rs=mysql_fetch_array($rsObj); //给PHP用,因为在 asptophp转换不完善
$isFocus = false;
//交点为假
$id = $rs['id'];
//【导航】
if ($tableName == 'webcolumn') {
if ($GLOBALS['isMakeHtml'] == true) {
$url = getRsUrl($rs['filename'], $rs['customaurl'], '/nav' . $rs['id']);
} else {
//.........这里部分代码省略.........
开发者ID:313801120,项目名称:AspPhpCms,代码行数:101,代码来源:2015_ToMyPHP.php
注:本文中的errorLog函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论