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


PHP Errors::LogError方法代码示例

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


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

示例1: ExecuteQuery

 /**
  * (non-PHPdoc)
  * @see class/db/IDataBase#ExecuteQuery()
  */
 public function ExecuteQuery($query)
 {
     //echo "<br>query: $query";
     DataBase::$QUERY_COUNT++;
     $query = str_replace("#S#", $this->_schema, $query);
     $result = $this->PDO->query($query);
     if ($result == false) {
         Errors::LogError("MySql:ExecuteQuery", $this->LastError() . " ::: " . $query);
     }
     return $result;
 }
开发者ID:uirapuru,项目名称:virgoapi,代码行数:15,代码来源:mysql.class.php

示例2: ExecuteQueryWithParams

 /**
  * (non-PHPdoc)
  * @see class/db/IDataBase#ExecuteQueryWithParams()
  */
 public function ExecuteQueryWithParams($query, $params)
 {
     $query = str_replace("#S#", $this->_schema, $query);
     $query = str_replace("\"", "", $query);
     $query = str_replace("`", "\"", $query);
     //echo "<br>query: $query";
     $result = pg_query_params($this->_link, $query, $params);
     if ($result == false) {
         Errors::LogError("PostgreSql:ExecuteQueryWithParams", $this->LastError());
     }
     return $result;
 }
开发者ID:uirapuru,项目名称:virgoapi,代码行数:16,代码来源:postgresql.class.php

示例3: GetLocationsAll

 /**
  * Import locations
  * @param mix $type
  * @return null
  */
 public function GetLocationsAll($type = false)
 {
     if (!$this->WS()) {
         return null;
     }
     try {
         $params = array('sid' => $this->_sid);
         $result = $this->WS()->getSC()->__soapCall("GetLocationsAll", array($params));
         $buf = $result->GetLocationsAllResult->ByteZip;
         $f = fopen(self::TMP_LOCATIONSALL_ZIP_FILE, "w");
         fwrite($f, $buf);
         fclose($f);
         //unzip XML file with lists
         $zip = new ZipArchive();
         if ($zip->open(self::TMP_LOCATIONSALL_ZIP_FILE)) {
             $fp = $zip->getStream('locationsall.xml');
             if (!$fp) {
                 exit("failed reading xml file (" . getcwd() . ")\n");
             }
             $contents = '';
             while (!feof($fp)) {
                 $contents .= fread($fp, 2);
             }
             fclose($fp);
             $zip->close();
             file_put_contents(self::TMP_XML_LOCATIONSALL_FILE, $contents);
             if (file_exists(self::TMP_LOCATIONSALL_ZIP_FILE)) {
                 unlink(self::TMP_LOCATIONSALL_ZIP_FILE);
             }
             $db = DataBase::GetDbInstance();
             $xml = simplexml_load_file(self::TMP_XML_LOCATIONSALL_FILE);
             $listsNode = null;
             //read main nodes
             if ($type === false || $type == 1) {
                 $query = "DELETE FROM powiaty";
                 $db->ExecuteQuery($query);
                 foreach ($xml->Powiaty->children() as $child) {
                     $query = "INSERT INTO powiaty VALUES(?, ?, ?)";
                     $params = array((int) $child['Id'], $child['Nazwa'], (int) $child['WojewodztwoId']);
                     $r = $db->ExecuteQueryWithParams($query, $params);
                 }
             }
             if ($type === false || $type == 2) {
                 $query = "DELETE FROM lokalizacje";
                 $db->ExecuteQuery($query);
                 foreach ($xml->Lokalizacje->children() as $child) {
                     $query = "INSERT INTO lokalizacje VALUES(?, ?, ?, ?, ?)";
                     $params = array((int) $child['Id'], $child['Nazwa'], (int) $child['PowiatId'], (int) $child['WojewodztwoId'], $child['Gmina'] == 'True' ? 1 : 0);
                     $r = $db->ExecuteQueryWithParams($query, $params);
                 }
             }
             if ($type === false || $type == 3) {
                 $query = "DELETE FROM dzielnice";
                 $db->ExecuteQuery($query);
                 foreach ($xml->Dzielnice->children() as $child) {
                     $query = "INSERT INTO dzielnice VALUES(?, ?, ?)";
                     $params = array((int) $child['Id'], $child['Nazwa'], (int) $child['LokalizacjaId']);
                     $r = $db->ExecuteQueryWithParams($query, $params);
                 }
             }
             if ($type === false || $type == 4) {
                 $query = "DELETE FROM rejony";
                 $db->ExecuteQuery($query);
                 foreach ($xml->Regiony->children() as $child) {
                     $query = "INSERT INTO rejony VALUES(?, ?, ?)";
                     $params = array((int) $child['Id'], $child['Nazwa'], (int) $child['DzielnicaId']);
                     $r = $db->ExecuteQueryWithParams($query, $params);
                 }
             }
             if (file_exists(self::TMP_XML_LOCATIONSALL_FILE)) {
                 unlink(self::TMP_XML_LOCATIONSALL_FILE);
             }
         }
     } catch (Exception $ex) {
         Errors::LogError("WebService:GetLists", $ex->getMessage());
     }
 }
开发者ID:uirapuru,项目名称:virgoapi,代码行数:82,代码来源:webservice.class.php

示例4: SendEmail

 /**
  * Sends email.
  * @param string $tresc
  * @param string $numer
  * @return null 
  */
 public function SendEmail($email, $szablon)
 {
     if (!$this->WS()) {
         return null;
     }
     try {
         $params = array('sid' => $this->_sid, 'email' => $email, 'szablon' => $szablon);
         $result = $this->WS()->getSC()->__soapCall("SendEmail", array($params));
         if ($result->SendEmailResult->Status != 0) {
             Errors::LogError("WebService:SendEmail", "Response: " . $result->SendEmailResult->Message);
         }
         return $result->SendEmailResult->Message;
     } catch (Exception $ex) {
         Errors::LogError("WebService:SendEmail", $ex->getMessage());
     }
 }
开发者ID:uirapuru,项目名称:virgoapi,代码行数:22,代码来源:webservice.class.php

示例5: ClearWebPhotos

 /**
  * Clear photos from given (by id) agent or department
  * @param int $idusr. Agents Id.
  * @param int $idodd. Departments Id.
  * @return string 
  */
 public function ClearWebPhotos($idusr = 0, $idodd = 0)
 {
     try {
         $path = getcwd() . "/photos/other/";
         if ($idusr > 0) {
             $src = $path . "3_" . $idusr . "_*.jpg";
         } elseif ($idodd > 0) {
             $src = $path . "1_" . $idodd . "_*.jpg";
         }
         var_dump($src);
         foreach (glob($src) as $filename) {
             unlink($filename);
         }
     } catch (Exception $ex) {
         Errors::LogError("VirgoAPI:ClearPhotos", $ex->getMessage());
         return "ERROR";
     }
 }
开发者ID:uirapuru,项目名称:virgoapi,代码行数:24,代码来源:webapi.class.php

示例6: GetLocationsAll

 /**
  * Import locations
  * @param int $type. Type of returned locations. Acceptable values 1,2,3,4. Default false.
  * @return string
  */
 public function GetLocationsAll($type = false)
 {
     try {
         WebServiceVirgo::WS()->LoginEx();
         $ret = WebServiceVirgo::WS()->GetLocationsAll($type);
         WebServiceVirgo::WS()->Logout();
         return $ret;
     } catch (Exception $ex) {
         Errors::LogError("VirgoAPI:GetLocationsAll", $ex->getMessage());
         return "ERROR";
     }
 }
开发者ID:uirapuru,项目名称:virgoapi,代码行数:17,代码来源:virgoapi.class.php


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