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


PHP Logging::writeLog_Warning方法代码示例

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


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

示例1: chkCSRFToken

 /**
  * CSRF対策のトークンをチェックする。
  * 異常時はログに書き込む
  * @return boolean
  */
 static function chkCSRFToken($file = null, $line = null)
 {
     if (ENABLE_CSRF == TRUE) {
         return true;
     }
     if ($_POST) {
         // CSRF トークンが正しいかチェック
         if (\Security::check_token()) {
             return true;
         }
     }
     $msg2 = 'Invalid CSRF Token';
     //		Log::error($msg2);
     $log = new Logging();
     $log->writeLog_Warning($msg2, $file, $line);
     return false;
 }
开发者ID:katsuwo,项目名称:bbs,代码行数:22,代码来源:csrfcheck.php

示例2: action_adminArticleDelete

 public function action_adminArticleDelete($shortName = null, $threadId = null)
 {
     if ($shortName == null || $threadId == null) {
         $log = new Logging();
         $log->writeLog_Warning('trying to detele board. but shortName or threadId is null', __FILE__, __LINE__);
         return Response::forge('パラメータ異常');
     }
     $mode = Input::get('mode');
     if ($mode == null || $mode != 'confirm' && $mode != 'delete') {
         $log = new Logging();
         $log->writeLog_Warning('trying to detele article. but mode-parameter is invalid.', __FILE__, __LINE__);
         return Response::forge('パラメータ異常');
     }
     //掲示板を取得
     $board = $this->getBoardFromShortName($shortName);
     if ($board == null) {
         $log = new Logging();
         $log->writeLog_Warning('trying to detele article. but board is missing.', __FILE__, __LINE__);
         return Response::forge('パラメータ異常');
     }
     //スレッドのbbsIdを確認
     if (!$this->isBoardContainsArticle($board, $threadId)) {
         $log = new Logging();
         $log->writeLog_Warning('trying to detele article. but board is not contain the article.', __FILE__, __LINE__);
         return Response::forge('パラメータ異常');
     }
     $this->setBoardTitle($board);
     Model_Article::clear_cache();
     //スレッド元か?レスか?
     $ar = Model_Article::find($threadId);
     $commentOf = $ar->commentOf;
     $backURL = '';
     if ($commentOf != 0) {
         $backURL = '/bbs/thread' . DS . $shortName . DS . $commentOf;
     } else {
         $backURL = '/bbs/index' . DS . $shortName;
     }
     if ($this->isBoardMine($board)) {
         $data['board'] = $board;
         $data['article'] = $ar;
         $data['attaches'] = $this->getAttach($board, $threadId);
         $data['backURL'] = $backURL;
         if ($mode == 'confirm') {
             $content = View::forge('bbs/articleDeleteConfirm', $data);
             $this->template->content = $content;
             return;
         } else {
             if ($mode == 'delete') {
                 $this->deleteArticle($ar);
                 Response::redirect($backURL);
             }
         }
     }
     $log = new Logging();
     $log->writeLog_Warning('trying to detele article. but owner is invalid', __FILE__, __LINE__);
     return Response::forge('パラメータ異常');
 }
开发者ID:katsuwo,项目名称:bbs,代码行数:57,代码来源:bbs.php


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