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

PHP LogMaster类代码示例

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

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



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

示例1: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = sasql_query($this->connection, $sql);
     if ($res === false) {
         throw new Exception("SaSQL operation failed\n" . sasql_error($this->connection));
     }
     $this->last_result = $res;
     return $res;
 }
开发者ID:elsonvinicius,项目名称:framework,代码行数:10,代码来源:db_sasql.php


示例2: query

 public function query($sql)
 {
     LogMaster::log($sql);
     if ($this->start_from) {
         $res = sqlsrv_query($this->connection, $sql, array(), array("Scrollable" => SQLSRV_CURSOR_STATIC));
     } else {
         $res = sqlsrv_query($this->connection, $sql);
     }
     if ($res === false) {
         $errors = sqlsrv_errors();
         $message = array();
         foreach ($errors as $error) {
             $message[] = $error["SQLSTATE"] . $error["code"] . $error["message"];
         }
         throw new Exception("SQLSrv operation failed\n" . implode("\n\n", $message));
     }
     if ($this->insert_operation) {
         sqlsrv_next_result($res);
         $last = sqlsrv_fetch_array($res);
         $this->last_id = $last["dhx_id"];
         sqlsrv_free_stmt($res);
     }
     if ($this->start_from) {
         $data = sqlsrv_fetch($res, SQLSRV_SCROLL_ABSOLUTE, $this->start_from - 1);
     }
     return $res;
 }
开发者ID:rokkit,项目名称:temp,代码行数:27,代码来源:db_sqlsrv.php


示例3: getFilesList

 private function getFilesList($path, $relation)
 {
     $fileSystemTypes = FileSystemTypes::getInstance();
     LogMaster::log("Query filesystem: " . $path);
     $dir = opendir($path . '/' . $relation);
     $result = new FileSystemResult();
     // forms fields list
     for ($i = 0; $i < count($this->config->data); $i++) {
         $fields[] = $this->config->data[$i]['db_name'];
     }
     // for every file and directory of folder
     while ($file = readdir($dir)) {
         // . and .. should not be in output list
         if ($file == '.' || $file == '..') {
             continue;
         }
         $newFile = array();
         // parse file name as Array('name', 'ext', 'is_dir')
         $fileNameExt = $this->parseFileName($path . '/' . $relation, $file);
         // checks if file should be in output array
         if (!$fileSystemTypes->checkFile($file, $fileNameExt)) {
             continue;
         }
         // takes file stat if it's need
         if (in_array('size', $fields) || in_array('date', $fields)) {
             $fileInfo = stat($path . '/' . $file);
         }
         // for every field forms list of fields
         for ($i = 0; $i < count($fields); $i++) {
             $field = $fields[$i];
             switch ($field) {
                 case 'filename':
                     $newFile['filename'] = $file;
                     break;
                 case 'full_filename':
                     $newFile['full_filename'] = $path . "/" . $file;
                     break;
                 case 'size':
                     $newFile['size'] = $fileInfo['size'];
                     break;
                 case 'extention':
                     $newFile['extention'] = $fileNameExt['ext'];
                     break;
                 case 'name':
                     $newFile['name'] = $fileNameExt['name'];
                     break;
                 case 'date':
                     $newFile['date'] = date("Y-m-d H:i:s", $fileInfo['ctime']);
                     break;
             }
             $newFile['relation_id'] = $relation . '/' . $file;
             $newFile['safe_name'] = $this->setFileName($relation . '/' . $file);
             $newFile['is_folder'] = $fileNameExt['is_dir'];
         }
         // add file in output list
         $result->addFile($newFile);
     }
     return $result;
 }
开发者ID:ValentinNikolaev,项目名称:Laravel5-dhtmlxScheduler-demo,代码行数:59,代码来源:db_filesystem.php


示例4: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = pg_query($this->connection, $sql);
     if ($res === false) {
         throw new Exception("Postgre - sql execution failed\n" . pg_last_error($this->connection));
     }
     return $res;
 }
开发者ID:sugarnet,项目名称:feanor-sg1,代码行数:9,代码来源:db_postgre.php


示例5: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("MySQL operation failed\n" . $this->connection->error);
     }
     return $res;
 }
开发者ID:neohusky,项目名称:demo,代码行数:9,代码来源:db_mysqli.php


示例6: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("PDO - sql execution failed\n" . $this->connection->errorInfo());
     }
     return new PDOResultSet($res);
 }
开发者ID:tmlsoft,项目名称:main,代码行数:9,代码来源:db_pdo.php


示例7: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("SQLLite - sql execution failed\n" . $this->connection->lastErrorMsg());
     }
     return $res;
 }
开发者ID:jekay100,项目名称:xwtec,代码行数:9,代码来源:db_sqlite3.php


示例8: query

 public function query($query)
 {
     LogMaster::log($query);
     $res = mysql_query($query, $this->connection);
     if (mysql_errno() != 0) {
         LogMaster::log($this->error());
     }
     return $res;
 }
开发者ID:nilBora,项目名称:konstruktor,代码行数:9,代码来源:mysql.php


示例9: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("CI - sql execution failed");
     }
     return new PHPCIResultSet($res);
 }
开发者ID:rokkit,项目名称:temp,代码行数:9,代码来源:db_phpci.php


示例10: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = sqlite_query($this->connection, $sql);
     if ($res === false) {
         throw new Exception("SQLLite - sql execution failed\n" . sqlite_error_string(sqlite_last_error($this->connection)));
     }
     return $res;
 }
开发者ID:neohusky,项目名称:demo,代码行数:9,代码来源:db_sqlite.php


示例11: query

 public function query($sql)
 {
     if ($this->last_result) {
         $this->last_result->closeCursor();
     }
     LogMaster::log($sql);
     $this->last_result = $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("PDO - sql execution failed\n" . $this->connection->errorInfo());
     }
     return $res;
 }
开发者ID:Jellious,项目名称:test2223,代码行数:12,代码来源:db_pdo.php


示例12: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = $this->connection->query($sql);
     if ($res === false) {
         throw new Exception("CI - sql execution failed");
     }
     if (is_object($res)) {
         return new PHPCIResultSet($res);
     }
     return new ArrayQueryWrapper(array());
 }
开发者ID:marianolg,项目名称:rosbaco,代码行数:12,代码来源:db_phpci2.php


示例13: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $res = mssql_query($sql, $this->connection, $this->start_from === false ? 10 : 0);
     if ($this->insert_operation) {
         $last = mssql_fetch_assoc($res);
         $this->last_id = $last["dhx_id"];
         mysql_free_result($res);
     }
     if ($this->start_from !== false) {
         mssql_data_seek($res, $this->start_from);
     }
     return $res;
 }
开发者ID:Jellious,项目名称:test2223,代码行数:14,代码来源:db_mssql.php


示例14: query

 public function query($sql)
 {
     LogMaster::log($sql);
     if (is_array($sql)) {
         $res = $this->connection->SelectLimit($sql['sql'], $sql['numrows'], $sql['offset']);
     } else {
         $res = $this->connection->Execute($sql);
     }
     if ($res === false) {
         throw new Exception("ADODB operation failed\n" . $this->connection->ErrorMsg());
     }
     $this->last_result = $res;
     return $res;
 }
开发者ID:kraaden,项目名称:scheduler,代码行数:14,代码来源:db_adodb.php


示例15: parse_request

 function parse_request()
 {
     parent::parse_request();
     if (isset($_GET["pos"])) {
         if (!$this->dload) {
             LogMaster::log("Dyn loading request received, but server side was not configured to process dyn. loading. ");
         } else {
             $this->request->set_limit($_GET["pos"], $this->dload);
         }
     }
     if (isset($_GET["mask"])) {
         $this->request->set_filter($this->config->text[0]["db_name"], $_GET["mask"] . "%", "LIKE");
     }
     LogMaster::log($this->request);
 }
开发者ID:ValentinNikolaev,项目名称:Laravel5-dhtmlxScheduler-demo,代码行数:15,代码来源:combo_connector.php


示例16: output_as_xml

 public function output_as_xml($results)
 {
     if (isset($_GET['action'])) {
         LogMaster::log("Edit operation finished", $results);
         ob_clean();
         $type = $results[0]->get_status();
         if ($type == "error" || $type == "invalid") {
             echo "false";
         } else {
             if ($type == "insert") {
                 echo "true\n" . $results[0]->get_new_id();
             } else {
                 echo "true";
             }
         }
     } else {
         return parent::output_as_xml($results);
     }
 }
开发者ID:jekay100,项目名称:xwtec,代码行数:19,代码来源:data_connector.php


示例17: query

 public function query($sql)
 {
     LogMaster::log($sql);
     if ($this->start_from) {
         $res = sqlsrv_query($this->connection, $sql, array(), array("Scrollable" => SQLSRV_CURSOR_STATIC));
     } else {
         $res = sqlsrv_query($this->connection, $sql);
     }
     if ($this->insert_operation) {
         sqlsrv_next_result($res);
         $last = sqlsrv_fetch_array($res);
         $this->last_id = $last["dhx_id"];
         sqlsrv_free_stmt($res);
     }
     if ($this->start_from) {
         $data = sqlsrv_fetch($res, SQLSRV_SCROLL_ABSOLUTE, $this->start_from - 1);
     }
     return $res;
 }
开发者ID:mudassartufail,项目名称:dhtmlx,代码行数:19,代码来源:db_sqlsrv.php


示例18: query

 public function query($sql)
 {
     LogMaster::log($sql);
     $stm = oci_parse($this->connection, $sql);
     if ($stm === false) {
         throw new Exception("Oracle - sql parsing failed\n" . oci_error($this->connection));
     }
     $out = array(0 => null);
     if ($this->insert_operation) {
         oci_bind_by_name($stm, ":outID", $out[0], 999);
         $this->insert_operation = false;
     }
     $mode = $this->is_record_transaction() || $this->is_global_transaction() ? OCI_DEFAULT : OCI_COMMIT_ON_SUCCESS;
     $res = oci_execute($stm, $mode);
     if ($res === false) {
         throw new Exception("Oracle - sql execution failed\n" . oci_error($this->connection));
     }
     $this->last_id = $out[0];
     return $stm;
 }
开发者ID:tmlsoft,项目名称:main,代码行数:20,代码来源:db_oracle.php


示例19: CSRF_detected

 static function CSRF_detected()
 {
     LogMaster::log("[SECURITY] Possible CSRF attack detected", array("referer" => $_SERVER["HTTP_REFERER"], "remote" => $_SERVER["REMOTE_ADDR"]));
     LogMaster::log("Request data", $_POST);
     die;
 }
开发者ID:neohusky,项目名称:demo,代码行数:6,代码来源:xss_filter.php


示例20: set_id

 function set_id($id)
 {
     $this->id = $id;
     LogMaster::log("Change id: " . $id);
 }
开发者ID:ValentinNikolaev,项目名称:Laravel5-dhtmlxScheduler-demo,代码行数:5,代码来源:dataprocessor.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP LogModel类代码示例发布时间:2022-05-23
下一篇:
PHP LogManager类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap