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

PHP writeToLog函数代码示例

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

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



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

示例1: printFault

/**
 *  Print SOAP Fault
 */
function printFault($exception, $client)
{
    echo '<h2>Fault</h2>' . "<br>\n";
    echo "<b>Code:</b>{$exception->faultcode}<br>\n";
    echo "<b>String:</b>{$exception->faultstring}<br>\n";
    writeToLog($client);
}
开发者ID:ebeauchamps,项目名称:brilliantretail,代码行数:10,代码来源:fedex-common.php


示例2: checkHeaders

function checkHeaders()
{
    global $response;
    if (!function_exists('getallheaders')) {
        function getallheaders()
        {
            while (@ob_end_flush()) {
            }
            $headers = '';
            foreach ($_SERVER as $name => $value) {
                if (substr($name, 0, 5) == 'HTTP_') {
                    $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
                }
            }
            return $headers;
        }
    }
    foreach (getallheaders() as $name => $value) {
        writeToLog("{$name}", "{$value}");
        $response[$name] = $value;
        if (strcasecmp($name, "Content-type") == 0 and strcasecmp($value, "application/json") == 0) {
            return true;
        }
    }
    return false;
    //return true;
}
开发者ID:NormantasKudzma,项目名称:BomberwebPhp,代码行数:27,代码来源:resourcebase.php


示例3: userLogin

function userLogin($username, $password, $log = true)
{
    global $USER, $MSG;
    if ($username == "") {
        array_push($MSG, getstring('warning.login.noemail'));
        return false;
    }
    if ($password == "") {
        array_push($MSG, getstring('warning.login.nopassword'));
        return false;
    }
    $USER = new User($username);
    $USER->setUsername($username);
    $USER->password = $password;
    if ($USER instanceof User) {
        if ($USER->validPassword($password)) {
            $_SESSION["session_username"] = $USER->getUsername();
            setcookie("user", $USER->getUsername(), time() + 60 * 60 * 24 * 30, "/");
            setLang($USER->getProp('lang'));
            if ($log) {
                writeToLog('info', 'login', 'user logged in');
            }
            return true;
        } else {
            array_push($MSG, getstring('warning.login.invalid'));
            writeToLog('info', 'loginfailure', 'username: ' . $username);
            unset($USER);
            return false;
        }
    } else {
        return false;
    }
}
开发者ID:nfreear,项目名称:mQuiz,代码行数:33,代码来源:accesslib.php


示例4: printFault

/**
 *  Print SOAP Fault
 */
function printFault($exception, $client)
{
    echo '<h2>Fault</h2>' . "<br>\n";
    echo "<b>Code:</b>{$exception->faultcode}<br>\n";
    echo "<b>String:</b>{$exception->faultstring}<br>\n";
    writeToLog($client);
    echo '<h2>Request</h2>' . "\n";
    echo '<pre>' . htmlspecialchars($client->__getLastRequest()) . '</pre>';
    echo "\n";
}
开发者ID:dhamodhar,项目名称:MysmartportalV0.1.3,代码行数:13,代码来源:fedex-common.php5


示例5: _mysql_query

function _mysql_query($query, $db)
{
    global $CONFIG;
    $start = microtime(true);
    $result = mysql_query($query, $db);
    if (!$result) {
        writeToLog('error', 'database', $query);
    }
    $CONFIG->mysql_queries_time += microtime(true) - $start;
    $CONFIG->mysql_queries_count++;
    return $result;
}
开发者ID:nfreear,项目名称:mQuiz,代码行数:12,代码来源:loglib.php


示例6: addMedia

function addMedia($data)
{
    global $kalturaUploadsUser, $kalturaUploadsPassword;
    $tags = $data['tags'];
    $tags = json_decode($tags, true);
    $userID = $tags['userid'];
    $serverVersion = $tags['version'];
    writeToLog("tags: {$tags}\n");
    writeToLog("userID: {$userID}\n");
    writeToLog("serverVersion: {$serverVersion}\n");
    //writeToLog(print_r($data, true));
    // TODO: read this in from a config file
    $link = mysql_connect('localhost', $kalturaUploadsUser, $kalturaUploadsPassword);
    //if (!$link) die('Not connected : ' . mysql_error());
    if (!$link) {
        writeToLog('Not connected : ' . mysql_error());
    }
    if ("clas_demo_server" == $serverVersion) {
        $db = "dev_annotation_tool";
    } elseif ("clas_prod_server" == $serverVersion) {
        $db = "annotation_tool";
    } elseif ("clas_prod2_server" == $serverVersion) {
        // TODO: switch name when music finishes using OVAL
        $db = "prod_annotation_tool";
        // ("clas_demo_server" == $tags)
    } else {
    }
    $db_selected = mysql_select_db($db, $link);
    //if (!$db_selected) die ("Can't use $db: " . mysql_error(); writeToLog("\nCan't use $db: " . mysql_error()););
    writeToLog("u:{$kalturaUploadsUser} p:{$kalturaUploadsPassword}\n");
    if (!$db_selected) {
        writeToLog("\nCan't use {$db}: " . mysql_error());
    }
    // get description, it's not available in notification
    $kclient = startKalturaSession();
    $result = $kclient->media->get($data['entry_id'], null);
    $arrayObj = new ArrayObject($result);
    $description = $arrayObj['description'];
    $duration = $data['length_in_msecs'] / 1000;
    $query = "INSERT INTO media VALUES ('{$data['entry_id']}', '{$userID}', '{$data['name']}', '{$description}', {$duration}, '{$data['thumbnail_url']}', 0, 0, NULL)";
    writeToLog("insertIntoDatabase() query: {$query}\n");
    $result = mysql_query($query, $link);
    //if (!$result) die('Invalid query (insertIntoDatabase): ' . mysql_error(); writeToLog("Invalid query"););
    if (!$result) {
        writeToLog("Invalid query");
    }
    mysql_close($link);
}
开发者ID:abelardopardo,项目名称:oval,代码行数:48,代码来源:notification_handler.php


示例7: setLang

function setLang($lang, $redirect = false)
{
    global $USER, $API;
    $_SESSION["session_lang"] = $lang;
    unset($_SESSION["lang_strings"]);
    if ($USER->userid != 0) {
        $API->setUserProperty($USER->userid, 'lang', $lang);
    }
    if ($redirect) {
        //redirect back to same page (to avoid the form resubmission popup)
        $url = "http" . (!empty($_SERVER["HTTPS"]) ? "s" : "") . "://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
        writeToLog('info', 'langchange', 'changed to: ' . $lang);
        header('Location: ' . $url);
        die;
    }
}
开发者ID:nfreear,项目名称:mQuiz,代码行数:16,代码来源:i8nlib.php


示例8: writeToLog

            $xml = $xml . "<email>" . $reg_mail . "</email>";
            $xml = $xml . "</registration>";
            echo $xml;
            writeToLog("End RegisterUser.\n{$xml}\n\n");
            exit;
        } else {
            // Build XML for a Failure response.
            writeToLog("User registration failed. User already exists. Writting failure XML.");
            header("Content-type: text/xml");
            $xml = "<?xml version='1.0' standalone='yes'?>";
            $xml = $xml . "<registration>";
            $xml = $xml . "<result>Failure</result>";
            $xml = $xml . "<name>" . $reg_user . "</name>";
            $xml = $xml . "<reason>User already exists.</reason>";
            $xml = $xml . "</registration>";
            echo $xml;
            writeToLog("End RegisterUser.\n{$xml}\n\n");
            exit;
            exit;
        }
        // End response
    } else {
        // Key compare failed. Redirect to an error page.
        setcookie("message", "Missing API private key.", time() + 300, '/');
        header('Location: ../error.php');
    }
    // End key compare.
}
// End post request
setcookie("message", "You can not make requests using a web browser.", time() + 300, '/');
header('Location: ../error.php');
开发者ID:subrock,项目名称:my_baseball_stats,代码行数:31,代码来源:index.php


示例9: printStandardReport

function printStandardReport($type, $cl)
{
    global $print_results, $log_format, $messages;
    if ($print_results) {
        print str_replace('%cur_time', date("H:i:s"), $messages[$type][$cl]);
        flush();
    }
    if ($log_format == "html") {
        writeToLog(str_replace('%cur_time', date("H:i:s"), $messages[$type][0]));
    } else {
        writeToLog(str_replace('%cur_time', date("H:i:s"), $messages[$type][1]));
    }
}
开发者ID:vijaydamale,项目名称:Test,代码行数:13,代码来源:messages.php


示例10: sendCurlResponse

if (isset($_GET['good'])) {
    $res = sendCurlResponse($_GET['good']);
    echo $res;
}
if (isset($_POST['mode']) && $_POST['mode'] == 'log') {
    $name = iconv("UTF-8", "Windows-1251", $_POST['good']);
    $id = $_POST['id'];
    $ip = "unknown";
    if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
        $ip = $_SERVER['HTTP_CLIENT_IP'];
    } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
        $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
    } else {
        $ip = $_SERVER['REMOTE_ADDR'];
    }
    echo writeToLog($name, $id, $ip);
}
function sendCurlResponse_old($id)
{
    global $part_id;
    $server = "http://p.my-shop.ru/cgi-bin/myorder.pl";
    $request = "partner={$part_id}&master=&cart={$id}-1&cartsource=get";
    $ch = curl_init($server);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $content = curl_exec($ch);
    $curl_errno = curl_errno($ch);
开发者ID:xent1986,项目名称:ychebgit,代码行数:31,代码来源:check.php


示例11: writeToLog

            exit;
        } else {
            // Build XML for a Failure response.
            writeToLog("User and password failed. Writting failure XML.");
            header("Content-type: text/xml");
            $xml = "<?xml version='1.0' standalone='yes'?>";
            $xml = $xml . "<authentication>";
            $xml = $xml . "<result>Failure</result>";
            $xml = $xml . "<id></id>";
            $xml = $xml . "<name></name>";
            $xml = $xml . "<email></email>";
            $xml = $xml . "</authentication>";
            echo $xml;
            writeToLog("End authentication.\n{$xml}\n\n");
            exit;
        }
        // End response
        writeToLog($xml);
    } else {
        // Key compare failed. Redirect to an error page.
        setcookie("message", "Missing API private key.", time() + 300, '/');
        header('Location: ../error.php');
    }
    // End key compare.
}
// End post request
setcookie("message", "An error has occured. All conditionals failed.", time() + 300, '/');
header('Location: ../error.php');
?>

开发者ID:subrock,项目名称:clientmon,代码行数:29,代码来源:index.php


示例12: date

                        $date = date('Y-m-d H:i:s');
                    }
                    writeToLog("info", "tracker", json_encode($tracks), 0, 0, 0, 0, $digest, $date);
                    $response->result = true;
                }
            } catch (Exception $e) {
                $response->result = false;
            }
        }
    }
}
/*
 * Output the response
 */
echo json_encode($response);
writeToLog("info", "pagehit", $_SERVER["REQUEST_URI"] . " method: " . $method);
$API->cleanUpDB();
function curPageURL()
{
    $pageURL = 'http';
    if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {
        $pageURL .= "s";
    }
    $pageURL .= "://";
    if ($_SERVER["SERVER_PORT"] != "80") {
        $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    } else {
        $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
    }
    return $pageURL;
}
开发者ID:nfreear,项目名称:mQuiz,代码行数:31,代码来源:index.php


示例13: dirname

 */
require_once dirname(__FILE__) . "/includes/global_deploy_config.php";
require_once dirname(__FILE__) . '/includes/kaltura/kaltura_functions.php';
require_once dirname(__FILE__) . "/includes/common.inc.php";
// override max_execution_time for this script because uploads to Kaltura can take a very long time
$max_execution_time = 60 * 60;
set_time_limit($max_execution_time);
writeToLog("\n-------------- Starting clas_dir/upload_to_kaltura.php -----------------\n");
// restrict this script to run from command line only
$sapi_type = php_sapi_name();
if ('cli' != substr($sapi_type, 0, 3)) {
    exit;
} else {
}
$title = stripslashes($argv[1]);
$description = stripslashes($argv[2]);
$userID = $argv[3];
$file = $argv[4];
$CopyrightTerm1 = $argv[5];
$CopyrightTerm2 = $argv[6];
$CopyrightTerm3 = $argv[7];
$CopyrightTerm4 = $argv[8];
writeToLog("{$file}: title {$title} -> upload started at " . date("H:i:s") . "\n");
// store custom data in 'tags' field since we aren't using the tags field
$data = "{$serverVersion},{$userID}" . ",{$CopyrightTerm1}" . ",{$CopyrightTerm2}" . ",{$CopyrightTerm3}" . ",{$CopyrightTerm4}" . "";
$fileToUpload = $uploadPath . $file;
writeToLog("calling uploadToKaltura({$fileToUpload}, {$title}, {$description}, {$data})" . "\n");
// die;
$entryID = uploadToKaltura($fileToUpload, $title, $description, $data);
writeToLog("{$file}: title {$title} -> upload finished at " . date("H:i:s") . ", result entry_id {$entryID}\n");
开发者ID:anzhao,项目名称:OVAL,代码行数:30,代码来源:upload_to_kaltura.php


示例14: printWhiteLink

function printWhiteLink($url, $title, $cl)
{
    global $db_con, $log_format, $copy, $no_log;
    $log_msg_txt = "\n{$url} found. \nTitle ignored, as it did not meet the whitelist.\n";
    $log_msg_html = "<br />Link:&nbsp;&nbsp;{$url}&nbsp;&nbsp;detected.<br />Title: {$title}<br /><span class='warnadmin'>Ignored, as the title did not meet the whitelist.</span><br />\n";
    if ($no_log == '0') {
        if ($cl != 1) {
            print $log_msg_html;
        } else {
            print $log_msg_txt;
        }
        @ob_flush();
        @flush();
    }
    if ($log_format == "html") {
        writeToLog($log_msg_html, $copy);
    } else {
        writeToLog($log_msg_txt, $copy);
    }
}
开发者ID:hackersforcharity,项目名称:rachelpiOS,代码行数:20,代码来源:messages.php


示例15: printSuccess

        $newLocation = $client->__setLocation(setEndpoint('endpoint'));
    }
    $response = $client->processShipment($request);
    // FedEx web service invocation
    if ($response->HighestSeverity != 'FAILURE' && $response->HighestSeverity != 'ERROR') {
        printSuccess($client, $response);
        // Create PNG or PDF label
        // Set LabelSpecification.ImageType to 'PDF' for generating a PDF label
        $fp = fopen(SHIP_LABEL, 'wb');
        fwrite($fp, $response->CompletedShipmentDetail->CompletedPackageDetails->Label->Parts->Image);
        fclose($fp);
        echo 'Label <a href="./' . SHIP_LABEL . '">' . SHIP_LABEL . '</a> was generated.';
    } else {
        printError($client, $response);
    }
    writeToLog($client);
    // Write to log file
} catch (SoapFault $exception) {
    printFault($exception, $client);
}
function addShipper()
{
    $shipper = array('Contact' => array('PersonName' => 'ASM Raju', 'CompanyName' => 'ELS', 'PhoneNumber' => '1234567890'), 'Address' => array('StreetLines' => array('Address Line 1'), 'City' => 'Austin', 'StateOrProvinceCode' => 'TX', 'PostalCode' => '73301', 'CountryCode' => 'US'));
    return $shipper;
}
function addRecipient()
{
    $recipient = array('Contact' => array('PersonName' => 'Rubai Mahbub', 'CompanyName' => 'Entrance', 'PhoneNumber' => '1234567891'), 'Address' => array('StreetLines' => array('Address Line 1'), 'City' => 'Richmond', 'StateOrProvinceCode' => 'BC', 'PostalCode' => 'V7C4V4', 'CountryCode' => 'CA', 'Residential' => false));
    return $recipient;
}
function addShippingChargesPayment()
开发者ID:rubaiet,项目名称:fedex,代码行数:31,代码来源:ShipWebServiceClient.php


示例16: writeToLog

            writeToLog("{$buildLogPath}/build.log", " Updating standard bootloader...<br>");
            $svnLoad->PrepareKextpackDownload("Bootloader", "StandardBoot", $chameRow['foldername']);
        }
    }
    //
    // Step 3 : Preparing/Applying Fixes and chameleon modules
    //
    writeToLog("{$buildLogPath}/build.log", "<br><b>Step 3) Apply and prepare fixes for system:</b><br>");
    applyFixes();
    writeToLog("{$buildLogPath}/build.log", " Copying selected chameleon modules...</b><br>");
    $chamModules->copyChamModules($modeldb[$modelRowID]);
    //
    // Step 4 : Start the download of prepared files for download
    //
    writeToLog("{$buildLogPath}/build.log", "<br><b>Step 3) Start the download of prepared files:</b><br>");
    writeToLog("{$buildLogPath}/build.log", "<br>");
    // Get all the files in comma seperated way
    $dListInfo = shell_exec("ls -m {$buildLogPath}/dLoadScripts/");
    $dScriptsArray = explode(',', $dListInfo);
    if (!is_dir("{$buildLogPath}/dLoadStatus")) {
        system_call("mkdir {$buildLogPath}/dLoadStatus");
    }
    foreach ($dScriptsArray as $dScript) {
        $dScript = preg_replace('/\\s+/', '', $dScript);
        //remove white spaces in name
        if ($dScript != "") {
            system_call("sh {$buildLogPath}/dLoadScripts/{$dScript} >> {$buildLogPath}/internetCheckLog.log &");
        }
    }
}
//-------------------------> Here starts the Vendor and model selector - but only if $action is empty
开发者ID:tomjrjones,项目名称:osxlatitude-edp,代码行数:31,代码来源:module.configuration.predefined.php


示例17: Sites

<?php

/*
Pro Sites (Amazon Payments Gateway IPN handler for backwards compatibility)

If you have existing subscriptions using the old pre 3.0 Supporter Paypal gateway, then it is important to
overwrite the supporter-amazon.php file in your webroot with this one to prevent a lapse in subscription
payments being applied.
*/
if (!isset($_POST['signature'])) {
    // Did not find expected POST variables. Possible access attempt from a non Amazon site.
    writeToLog('Invalid visit to the IPN script from IP ' . $_SERVER['REMOTE_ADDR'] . "\n" . var_export($_POST, true));
    header('Status: 404 Not Found');
    exit;
} else {
    define('ABSPATH', dirname(__FILE__) . '/');
    require_once ABSPATH . 'wp-load.php';
    global $wpdb, $psts;
    $secret_key = get_site_option("supporter_amazon_secretkey");
    $access_key = get_site_option("supporter_amazon_accesskey");
    $utils = new Amazon_FPS_SignatureUtilsForOutbound($aws_access_key, $aws_secret_key);
    $self_address = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    $valid = $utils->validateRequest($_POST, $self_address, "POST");
    if (!$valid) {
        header('Status: 401 Unauthorized');
        exit;
    }
    list($blog_id, $period, $amount, $type, $stamp) = explode('_', $_POST['referenceId']);
    // process Amazon response
    switch ($_POST['status']) {
        case 'PI':
开发者ID:vilmark,项目名称:vilmark_main,代码行数:31,代码来源:supporter-amazon.php


示例18: svnDataLoader

 function svnDataLoader($logType, $categ, $fname)
 {
     global $workPath, $svnpackPath, $edp;
     switch ($logType) {
         case "AppsTools":
             $logPath = "{$workPath}/logs/apps";
             // create app local download directory if not found
             if (!is_dir("{$workPath}/apps")) {
                 system_call("mkdir {$workPath}/apps");
             }
             if (!is_dir("{$workPath}/apps/{$categ}")) {
                 system_call("mkdir {$workPath}/apps/{$categ}");
             }
             $dataDir = "{$workPath}/apps/{$categ}";
             $svnpath = "apps/{$categ}/{$fname}";
             $logName = "appInstall";
             break;
         case "Kexts":
             $logPath = "{$workPath}/logs/build";
             // create fix local download directory if not found
             if (!is_dir("{$svnpackPath}")) {
                 system_call("mkdir {$svnpackPath}");
             }
             if (!is_dir("{$svnpackPath}/{$categ}")) {
                 system_call("mkdir {$svnpackPath}/{$categ}");
             }
             $dataDir = "{$svnpackPath}/{$categ}";
             $svnpath = "kextpacks/{$categ}/{$fname}";
             $logName = "kextInstall";
             break;
         case "Update":
             $logPath = "{$workPath}/logs/update";
             // create update local download directory if not found
             if (!is_dir("{$svnpackPath}")) {
                 system_call("mkdir {$svnpackPath}");
             }
             if (!is_dir("{$svnpackPath}/{$categ}")) {
                 system_call("mkdir {$svnpackPath}/{$categ}");
             }
             $dataDir = "{$svnpackPath}/{$categ}";
             $svnpath = "kextpacks/{$categ}/{$fname}";
             $logName = "packUpdateLog";
             break;
         case "Fixes":
             $logPath = "{$workPath}/logs/fixes";
             // create fix local download directory if not found
             if (!is_dir("{$svnpackPath}")) {
                 system_call("mkdir {$svnpackPath}");
             }
             if (!is_dir("{$svnpackPath}/{$categ}")) {
                 system_call("mkdir {$svnpackPath}/{$categ}");
             }
             $dataDir = "{$svnpackPath}/{$categ}";
             $svnpath = "kextpacks/{$categ}/{$fname}";
             $logName = "fixInstall";
             break;
     }
     // create log directory if not found
     if (!is_dir("{$workPath}/logs")) {
         system_call("mkdir {$workPath}/logs");
     }
     if (!is_dir("{$logPath}")) {
         system_call("mkdir {$logPath}");
     }
     //
     // Run download script (which downloads data from SVN) in background to download asynchronously
     // (synchronous which is without background download has freezing problem and
     //  we can't provide download status in php due to no multhreading)
     //
     if (is_dir("{$dataDir}/{$fname}")) {
         $checkoutCmd = "if ping -q -c 2 google.com; then if svn --non-interactive --username edp --password edp --quiet --force update {$dataDir}/{$fname}; then echo \"{$fname} file(s) updated finished<br>\"; touch {$logPath}/Success_{$fname}.txt; fi else echo \"{$fname} file(s) update failed due to no internet<br>\"; touch {$logPath}/Fail_{$fname}.txt; fi";
         writeToLog("{$logPath}/{$fname}.sh", "{$checkoutCmd};");
         system_call("sh {$logPath}/{$fname}.sh >> {$logPath}/{$logName}.log &");
     } else {
         $checkoutCmd = "cd {$dataDir}; if ping -q -c 2 google.com; then if svn --non-interactive --username osxlatitude-edp-read-only --quiet --force co http://osxlatitude-edp.googlecode.com/svn/{$svnpath}; then echo \"{$fname} file(s) download finished<br>\"; touch {$logPath}/Success_{$fname}.txt; fi else echo \"{$fname} file(s) download failed due to no internet<br>\"; touch {$logPath}/Fail_{$fname}.txt; fi";
         writeToLog("{$logPath}/{$fname}.sh", "{$checkoutCmd};");
         system_call("sh {$logPath}/{$fname}.sh >> {$logPath}/{$logName}.log &");
     }
 }
开发者ID:tomjrjones,项目名称:osxlatitude-edp,代码行数:79,代码来源:svn.php


示例19: persistSyllabusContent

function persistSyllabusContent($file)
{
    // MYSQL HARDCODED VALUES
    $servername = "localhost";
    $username = "c_syllabus";
    $password = "defeudalizing phorrhea emblematized althein";
    $dbname = "c_syllabus";
    writeToLog($file);
    if (is_file($file)) {
        // Connect to MySQL Database
        $conn = new mysqli($servername, $username, $password, $dbname);
        if ($conn->connect_error) {
            writeToLog("Connection failed: " . $conn->connect_error);
            die("Connection failed: " . $conn->connect_error);
        }
        // Prepare SQL statement
        $sth = $conn->prepare("UPDATE course_syllabi SET content = ? WHERE id = ?");
        $sth->bind_param('ss', $content, $id);
        // Get Syllabus ID from filename
        $id = substr(basename($file), 0, -4);
        // Open Text file and read contents
        $myfile = fopen($file, "r") or die("Unable to open file!");
        $content = fread($myfile, filesize($file));
        fclose($myfile);
        $content = preg_replace('/[^a-zA-Z0-9\\s]/', '', $content);
        // Update database
        $sth->send_long_data(0, $content);
        $sth->execute();
        $sth->close();
        $conn->close();
    }
}
开发者ID:assettcu,项目名称:syllabus,代码行数:32,代码来源:OCRCheck.php


示例20: printStandardReport

function printStandardReport($type, $cl)
{
    global $messages, $copy;
    if (Configure::read('print_results')) {
        if (isset($messages[$type][$cl])) {
            print str_replace('%cur_time', date("H:i:s"), $messages[$type][$cl]);
        }
        // ob_flush();
        flush();
    }
    if (Configure::read('log_format') == "html") {
        if (isset($messages[$type][0])) {
            writeToLog(str_replace('%cur_time', date("H:i:s"), $messages[$type][0]), $copy);
        }
    } else {
        if (isset($messages[$type][1])) {
            writeToLog(str_replace('%cur_time', date("H:i:s"), $messages[$type][1]));
        }
    }
}
开发者ID:pwh,项目名称:scrutiny,代码行数:20,代码来源:messages.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP write_array_to_file函数代码示例发布时间:2022-05-23
下一篇:
PHP writeToFile函数代码示例发布时间: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