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


PHP WriteLog函数代码示例

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


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

示例1: CreateConnection

 public function CreateConnection()
 {
     $con = new mysqli($this->server, $this->user, $this->password, $this->database);
     if ($con->connect_error) {
         WriteLog("failed_connection", "Failed to connect to " . $this->user . "@" . $this->server . " - " . $con->connect_error);
         die("Connection @" . $this->server . " failed: " . $con->connect_error);
     }
     return $con;
 }
开发者ID:ChampaWasTaken,项目名称:HyperBB,代码行数:9,代码来源:database.mysqli-oop.php

示例2: Insert_media

 public function Insert_media($mediaid, $medianame, $urlheader, $accessinfo)
 {
     $this->sql = "INSERT INTO medias (mediaid,medianame,urlheader,accessinfo)\n           VALUES ({$mediaid}','{$medianame}','{$urlheader}','{$accessinfo}')";
     if ($this->conn->query($this->sql) === TRUE) {
         WriteLog(mysql_error());
         return "OK";
     } else {
         WriteLog("错误");
         return "NO";
     }
     $str = mysql_error($this->conn);
     WriteLog($str);
 }
开发者ID:BocomWincent,项目名称:AllHelpService,代码行数:13,代码来源:uploadmedia.php

示例3: Update_image

 public function Update_image($userid, $image)
 {
     $this->sql = "UPDATE users SET headimage='{$image}'\n        WHERE userid='{$userid}'";
     if ($this->conn->query($this->sql) === TRUE) {
         WriteLog(mysqli_error());
         return "OK";
     } else {
         WriteLog(mysqli_error());
         return "NO";
     }
     $str = mysql_error($this->conn);
     WriteLog($str);
 }
开发者ID:BocomWincent,项目名称:AllHelpService,代码行数:13,代码来源:uploadheadimage.php

示例4: array

 function &getEntity($class, $key, $params = array(), $mode = READ_MODE, $package = DEFAULT_PACKAGE)
 {
     // ñìîòðèì ðåæèì ñêà÷èâàíèÿ (ìîæåò èñïîëüçîâàòüñÿ ïîòîì äëÿ ïðàâ)
     $mode = intval($mode);
     if (!$mode) {
         WriteLog('Invalid mode of entity ' . $class . ' in mode ' . $mode, LOGFILE_ENITY);
         return;
     }
     // èùåì ñóùíîñòü â êåøå (äëÿ óáûñòðåíèÿ è îáñåïå÷åíèÿ ïîâòîðíîãî ÷òåíèÿ)
     $hash = md5($package . $class . $mode . serialize($params) . serialize($key));
     if (!empty($this->_entity[$hash])) {
         return $this->_entity[$hash]['entity'];
     } else {
         //Try build new entity
         if (empty($class)) {
             return null;
         }
         if (empty($package)) {
             $package = DEFAULT_PACKAGE;
         }
         $class .= "Entity";
         $full_path = PACKAGES_DIR . '/' . str_replace('.', '/', $package) . '/' . $class . '.class.php';
         if (file_exists($full_path)) {
             if (!in_array($full_path, get_required_files())) {
                 require_once $full_path;
             }
             //Check that needly class exists
             if (!class_exists(str_replace('.', '_', $package) . '_' . $class)) {
                 class_log('XEntityCache', 'Class ' . $class . '  not found ', ENTITYCACHE_LOG);
                 return null;
             } else {
                 $full_class = str_replace('.', '_', $package) . '_' . $class;
                 $methods = array_flip(get_class_methods($full_class));
                 //If called class not derived from entity return null
                 if (!in_array('xentity', $methods)) {
                     return null;
                 }
             }
             return $this->_createEntity($full_class, $key, $params, $mode, $hash);
         } else {
             $sth = null;
             return $sth;
         }
     }
 }
开发者ID:parxomchik,项目名称:Agro,代码行数:45,代码来源:XEntityCache.class.php

示例5: myErrorHandler

function myErrorHandler($errno, $errstr, $errfile, $errline)
{
    $message = "";
    switch ($errno) {
        case FATAL:
            $message = "  Fatal error in line " . $errline . " of file " . $errfile . "";
            break;
        case ERROR:
            $message = "<b>ERROR</b> [{$errno}] {$errstr} in line " . $errline . " of file " . $errfile . "";
            break;
        case WARNING:
            $message = "<b>WARNING</b> [{$errno}] {$errstr} in line " . $errline . " of file " . $errfile . "";
            break;
        default:
            $message = "Unkown error type: [{$errno}] {$errstr} in line " . $errline . " of file " . $errfile . "";
            break;
    }
    WriteLog($message, LOGFILE_GENERAL);
}
开发者ID:parxomchik,项目名称:Agro,代码行数:19,代码来源:debug.inc.php

示例6: ShowArray

function ShowArray(&$array, $varName = null)
{
    WriteLog("==============================");
    WriteLog("=======ShowArray Start========");
    if (is_array($array)) {
        WriteLog("==============================");
        WriteLog("- print array {$varName} vars:");
        while (list($key, $val) = each($array)) {
            if (is_array($val)) {
                ShowArray($val);
            } else {
                if (!is_object($val)) {
                    WriteLog("- {$key} => {$val}");
                }
            }
        }
        WriteLog("- printing finish Array .\n");
        WriteLog("==============================");
    } else {
        WriteLog("- {$array} is not an Array");
        WriteLog("==============================");
    }
}
开发者ID:syafiqazwan,项目名称:pharmaco,代码行数:23,代码来源:function_ref_table.php

示例7: byte_output

     for ($i = 1; $i < $dump['part'] - $dump['part_offset']; $i++) {
         $mpdatei = $dateistamm . $i . $dateiendung;
         $sz = byte_output(@filesize($config['paths']['backup'] . $mpdatei));
         $out .= "\n" . $lang['L_FILE'] . ' <a href="' . $config['paths']['backup'] . $mpdatei . '" class="smallblack">' . $mpdatei . ' (' . $sz . ')</a> ' . $lang['L_DUMP_SUCCESSFUL'] . '<br>';
     }
 } else {
     $out .= "\n" . '<div class="backupmsg">' . $lang['L_FILE'] . ' <a href="' . $config['paths']['backup'] . $dump['backupdatei'] . '" class="smallblack">' . $dump['backupdatei'] . ' (' . byte_output(filesize($config['paths']['backup'] . $dump['backupdatei'])) . ')' . '</a>' . $lang['L_DUMP_SUCCESSFUL'] . '<br>';
 }
 $xtime = time() - $xtime;
 $aus = array();
 $aus[] = '<br>' . "\n";
 if ($config['multi_dump'] == 1) {
     WriteLog('Dump \'' . $dump['backupdatei'] . '\' finished.');
     WriteLog('Multidump: ' . count($databases['multi']) . ' Databases in ' . zeit_format($xtime) . '.');
 } else {
     WriteLog('Dump \'' . $dump['backupdatei'] . '\' finished in ' . zeit_format($xtime) . '.');
 }
 if ($config['send_mail'] == 1) {
     DoEmail();
 }
 for ($i = 0; $i < 3; $i++) {
     if ($config['ftp_transfer'][$i] == 1) {
         DoFTP($i);
     }
 }
 $aus[] = '<strong>' . $lang['L_DONE'] . '</strong><br>';
 if ($config['multi_dump'] == 1) {
     $aus[] = sprintf($lang['L_MULTIDUMP'], count($databases['multi'])) . ': ';
     $aus[] = '<strong>' . implode(', ', $databases['multi']) . '</strong>';
     $aus2 = '';
     $out = '';
开发者ID:thaian2009,项目名称:php,代码行数:31,代码来源:dump.php

示例8: array

            $_POST = array();
            foreach ($fap as $key => $val) {
                $_POST[$key] = $val;
            }
        }
        $settings['merchant_id'] = $SysValue['fondy']['fondy_merchant_id'];
        $settings['secret_key'] = $SysValue['fondy']['fondy_secret_key'];
        $valid = FondyForm::isPaymentValid($settings, $_POST);
        if ($valid == true && $_POST['order_status'] == FondyForm::ORDER_APPROVED) {
            $order_metod = "fondy";
            $success_function = true;
            // Выключаем функцию обновления статуса заказа, операция уже выполнена в result.php
            $my_crc = "NoN";
            $crc = "NoN";
            $inv_id = $_GET['inv_id'];
        } else {
            WriteLog($valid);
        }
    }
}
function WriteLog($MY_LMI_HASH)
{
    $handle = fopen("../paymentlog.log", "a+");
    $post = null;
    foreach ($_POST as $k => $v) {
        $post .= $k . "=" . $v . "\r\n";
    }
    $str = "\n\tFondy Payment Start ------------------\n\tdate=" . date("F j, Y, g:i a") . "\n\t{$post}\n\tMY_LMI_HASH={$MY_LMI_HASH}\n\tREQUEST_URI=" . $_SERVER['REQUEST_URI'] . "\n\tIP=" . $_SERVER['REMOTE_ADDR'] . "\n\tFondy Payment End --------------------\n\t";
    fwrite($handle, $str);
    fclose($handle);
}
开发者ID:cloudipsp,项目名称:phpshop,代码行数:31,代码来源:success.php

示例9: WriteLog

            $msg .= '<p class="small">File \'' . $del[$i] . '\' gel&ouml;scht<br>';
            WriteLog("deleted '{$del[$i]}'.");
        }
        $msg .= '</p>';
    }
    $del = DeleteFilesM($fpath, "*.gz");
}
if (isset($_POST['deleteallfilter'])) {
    //hier kommt alldelete rein
    $del = DeleteFilesM($fpath, $databases['db_actual'] . "*");
    if ($del == 0) {
        //$msg.="Fehler beim l&ouml;schen!";
    } else {
        for ($i = 0; $i < sizeof($del); $i++) {
            $msg .= '<p class="small">File \'' . $del[$i] . '\' gel&ouml;scht<br>';
            WriteLog("deleted '{$del[$i]}'.");
        }
        $msg .= '</p>';
    }
}
//////////////////////////////////
// Upload
///////////////////////////////////
if (isset($_POST['upload'])) {
    $error = false;
    if (!isset($_FILES['upfile']['name'])) {
        echo '<span class="error">' . $lang['fm_uploadfilerequest'] . '</span><br><br>';
    } else {
        if (!file_exists($fpath . $_FILES['upfile']['name'])) {
            // Extension ermitteln -strrpos f&auml;ngt hinten an und ermittelt somit den letzten Punkt
            $endung = strrchr($_FILES['upfile']['name'], ".");
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:filemanagement.php

示例10: NoResults

    if ($result_count == 0) {
        NoResults();
        // If we got more than one entry, then something is really messed up with
        // the database, there must not be more than one entry with the same data
    } elseif ($result_count > 1) {
        MultipleResults();
        // If we got one coincidence, then we can proceed to deletion
    } elseif ($result_count == 1) {
        // Assigning DN to delete
        $dn = $search_entries[0]["dn"];
        // Deleting ...
        $del = AssistedLDAPDelete($ldapc, $dn);
        // If the deleting went OK, we send the notification e-mail to the user
        if ($del) {
            $send = AssistedEMail("DeleteUserDo", $mail);
        }
        // If the mailing went OK ...
        if ($send) {
            // We log the event
            WriteLog("DeleteUserDo");
            // Print the good news to the user
            Success("DeleteUserDo");
        } else {
            // We fail nicely, at least
            Fail("DeleteUserDo");
        }
    }
}
// Closing the connection
$ldapx = AssistedLDAPClose($ldapc);
require_once "./themes/{$app_theme}/footer.php";
开发者ID:awasthi,项目名称:aguilas,代码行数:31,代码来源:DeleteUserDo.php

示例11: WriteLog

    }
    $bDoneSomething = true;
}
//
// write to the log file
//
if (!empty($LOGDIR) && isset($SPECIAL_VALUES["logfile"]) && !empty($SPECIAL_VALUES["logfile"])) {
    //
    // Hook system: before writing log file
    //
    if ($HOOK_DIR !== "") {
        if (!@(include "{$HOOK_DIR}/fmhookprelog.inc.php")) {
            @(include "{$HOOK_DIR}/fmhookprelog.inc");
        }
    }
    WriteLog($LOGDIR . "/" . basename($SPECIAL_VALUES["logfile"]));
    //
    // Hook system: after writing log file
    //
    if ($HOOK_DIR !== "") {
        if (!@(include "{$HOOK_DIR}/fmhookpostlog.inc.php")) {
            @(include "{$HOOK_DIR}/fmhookpostlog.inc");
        }
    }
    $bDoneSomething = true;
}
//
// send to the CRM
//
if (isset($SPECIAL_VALUES["crm_url"]) && isset($SPECIAL_VALUES["crm_spec"]) && !empty($SPECIAL_VALUES["crm_url"]) && !empty($SPECIAL_VALUES["crm_spec"])) {
    $sCRM = GetCRMURL($SPECIAL_VALUES["crm_spec"], $aAllRawValues, $SPECIAL_VALUES["crm_url"]);
开发者ID:chrismathers,项目名称:premierplacement,代码行数:31,代码来源:resumemailer_061612.php

示例12: DeleteFilesM

    } else {
        $del = DeleteFilesM($fpath, $databases['db_actual'] . "*");
    }
}
// print file-delete-messages
if (is_array($del) && sizeof($del) > 0) {
    foreach ($del as $filename => $success) {
        if ($success) {
            $msg .= '<span class="small">';
            $msg .= $lang['L_FM_DELETE1'] . ' \'' . $filename . '\' ' . $lang['L_FM_DELETE2'];
            WriteLog("deleted '{$filename}'.");
            $msg .= '</span><br>';
        } else {
            $msg .= '<span class="small error">';
            $msg .= $lang['L_FM_DELETE1'] . ' \'' . $filename . '\' ' . $lang['L_FM_DELETE3'];
            WriteLog("deleted '{$filename}'.");
            $msg .= '</span><br>';
        }
    }
}
// Upload
if (isset($_POST['upload'])) {
    $error = false;
    if (!isset($_FILES['upfile']['name'])) {
        echo '<span class="error">' . $lang['L_FM_UPLOADFILEREQUEST'] . '</span><br><br>';
    } else {
        if (!file_exists($fpath . $_FILES['upfile']['name'])) {
            // Extension ermitteln -strrpos f&auml;ngt hinten an und ermittelt somit den letzten Punkt
            $endung = strrchr($_FILES['upfile']['name'], ".");
            $erlaubt = array(".gz", ".sql");
            if (!in_array($endung, $erlaubt)) {
开发者ID:robmat,项目名称:samplebator,代码行数:31,代码来源:filemanagement.php

示例13: AssistedLDAPModify

                    $in2['uidNumber'] = $in['uidNumber'];
                    // Incrementing maxUID entry
                    $mod = AssistedLDAPModify($ldapc, $moddn, $in2);
                }
                // If the modification went OK, we send the notification e-mail to the user
                if ($mod) {
                    $send = AssistedEMail("NewUserDo", $mail);
                }
                // If the mailing went OK ...
                if ($send) {
                    // We need to get rid of the temporary entry
                    $del_q = sprintf("DELETE FROM NewUser" . " WHERE uid='%s'" . " AND token='%s'", mysql_real_escape_string($uid), mysql_real_escape_string($token));
                    // Deleting the row from the table ...
                    $del_r = AssistedMYSQLQuery($del_q);
                    // We log the event
                    WriteLog("NewUserDo");
                    // Print the good news to the user
                    Success("NewUserDo");
                } else {
                    // We fail nicely, at least
                    Fail("NewUserDo");
                }
            }
        }
    }
}
// Closing the connection
$ldapx = AssistedLDAPClose($ldapc);
// Closing the connection
$mysqlx = AssistedMYSQLClose($mysqlc);
require_once "./themes/{$app_theme}/footer.php";
开发者ID:awasthi,项目名称:aguilas,代码行数:31,代码来源:NewUserDo.php

示例14: DeleteFile

function DeleteFile($files, $function = 'max')
{
    global $config, $lang;
    $delfile = explode("|", $files);
    $r = '<p class="error">' . $lang['L_FM_AUTODEL1'] . '<br>';
    $r .= $delfile[3] . "<br>";
    $part = $delfile[2];
    if ($part > 0) {
        for ($i = $part; $i > 0; $i--) {
            $delete = @unlink($config['paths']['backup'] . $delfile[3]);
            if ($delete) {
                WriteLog("autodeleted ({$function}) '{$delfile['3']}'.");
            }
        }
    } else {
        WriteLog("autodeleted ({$function}) '{$delfile['3']}'.");
        unlink($config['paths']['backup'] . $delfile[3]);
    }
    $r .= '</p>';
    return $r;
}
开发者ID:thaian2009,项目名称:php,代码行数:21,代码来源:functions_global.php

示例15: Run

 function Run($mymode = "usual")
 {
     /*
     // âêëþ÷åíèå ïðàâ íà ïðîñìîòð òîé èëè èíîé ñòðàíèöû
     if ( !$this->_checkGroupPolicy( $this->PageInfo->getAllow(), $this->PageInfo->getDeny() ) )
     {
        // TODO: óáðàòü ýòî
        echo "íåäîñòóïíîñòü ñòðàíèöû èç-çà ïðàâ";
        header( "Location: ".$this->PageInfo->Redirect );
        exit;
     }
     */
     // Создание объектов
     $this->_createObjects();
     // Отработка действий заранее
     if ($_SERVER['REQUEST_METHOD'] == 'GET') {
         if (!empty($_GET['ACTION'])) {
             $this->_action = trim($_GET['ACTION']);
         } else {
             $this->_action = null;
         }
         $this->Request =& $_GET;
     } else {
         if (!empty($_POST['ACTION'])) {
             $this->_action = trim($_POST['ACTION']);
         } else {
             $this->_action = null;
         }
         $this->Request =& $_POST;
     }
     /*
     // TODO: получение ключей для UTF8
     if ((SITEENCODING != 'utf-8' ) && (!defined('ADMINPANEL')))
     {
         foreach ($this->Request as $key=>$value)
         {
             if (is_array($value)) continue;
     
             $this->Request[$key] = iconv(SITEENCODING, "utf-8", $value);
     
         }
     }
     */
     //print_r( $this->Request );
     // unset($this->Request[ 'ACTION' ]);
     //Run pre actions
     $steps = $this->PageInfo->getPreSteps($this->User->getGroups());
     // print_r($steps);
     $this->_runSteps($steps);
     if (!empty($this->_action)) {
         $steps = $this->PageInfo->getActionSteps($this->_action, $this->User->getGroups());
         $this->_runSteps($steps);
     }
     //Run post actions
     $steps = $this->PageInfo->getPostSteps($this->User->getGroups());
     $this->_runSteps($steps);
     $this->_callShow();
     $this->_showOutput($mymode);
     $tt = preg_split("/\\ /", microtime());
     $workTime = intval($tt[1]) + doubleval($tt[0]) - $this->_startTime;
     WriteLog("Work time - " . $workTime . "s", LOGFILE_STAT);
 }
开发者ID:parxomchik,项目名称:Agro,代码行数:62,代码来源:XFramework.class.php


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