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

PHP verbose函数代码示例

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

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



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

示例1: outputImage

/**
 * Output an image together with last modified header.
 *
 * @param string $file as path to the image.
 * @param boolean $verbose if verbose mode is on or off.
 */
function outputImage($file, $verbose)
{
    $info = getimagesize($file);
    !empty($info) or errorMessage("The file doesn't seem to be an image.");
    $mime = $info['mime'];
    $lastModified = filemtime($file);
    $gmdate = gmdate("D, d M Y H:i:s", $lastModified);
    if ($verbose) {
        verbose("Memory peak: " . round(memory_get_peak_usage() / 1024 / 1024) . "M");
        verbose("Memory limit: " . ini_get('memory_limit'));
        verbose("Time is {$gmdate} GMT.");
    }
    if (!$verbose) {
        header('Last-Modified: ' . $gmdate . ' GMT');
    }
    if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $lastModified) {
        if ($verbose) {
            verbose("Would send header 304 Not Modified, but its verbose mode.");
            exit;
        }
        //die(strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) . " not modified $lastModified");
        header('HTTP/1.0 304 Not Modified');
    } else {
        if ($verbose) {
            verbose("Would send header to deliver image with modified time: {$gmdate} GMT, but its verbose mode.");
            exit;
        }
        header('Content-type: ' . $mime);
        readfile($file);
    }
    exit;
}
开发者ID:bthurvi,项目名称:oophp,代码行数:38,代码来源:imgmos.php


示例2: verboseFail

function verboseFail($text, $success)
{
    if ($success) {
        verbose($text);
    } else {
        echo "<span class=\"error\">" . $text . "</span>\n";
    }
}
开发者ID:BackupTheBerlios,项目名称:webphpimap-svn,代码行数:8,代码来源:functions.php


示例3: report

function report($text, $isErrror = false)
{
    global $report, $force, $cms_language, $content;
    $text = $isErrror ? '<span class="atm-red">' . $text . '</span>' : '<strong>' . $text . '</strong>';
    verbose($text);
    if ($isErrror && !$force) {
        $send = '<br />
		======' . $cms_language->getMessage(MESSAGE_PAGE_END_OF_INSTALL) . '======';
        $content .= $send;
        echo $content;
        exit;
    }
}
开发者ID:davidmottet,项目名称:automne,代码行数:13,代码来源:server-update.php


示例4: start

 private function start()
 {
     verbose('Running ' . $this->getImageName() . '...');
     $cmd = 'sudo docker run -v ' . $this->directory . '/www:/var/www -p ' . $this->getPort() . ':80';
     if (ArgParser::isInteractiveMode()) {
         $cmd .= ' -i -t ' . $this->getImageName() . ' /bin/bash';
         new Command($cmd, true);
     } else {
         $cmd .= ' -d ' . $this->getImageName();
         $command = new Command($cmd);
         if ($command->exitCode !== 0) {
             throw new Exception('Error running container');
         }
         out($this->getImageName() . ' running successfully at: http://localhost:' . $this->getPort());
     }
 }
开发者ID:jchavannes,项目名称:web-framework-benchmarks,代码行数:16,代码来源:run.php


示例5: analyseResourceCalendarXML

function analyseResourceCalendarXML($string, $pimfile)
{
    verbose("Analyzing Resource Calendar XML for File '" . $pimfile . "'");
    $translator_phPIMap = array("pimfile", "uid", "summary", "from", "to");
    $translator_XML = array($pimfile, "uid", "summary", "start-date", "end-date");
    $xmlread = new MiniXMLDoc();
    $xmlread->fromString($string);
    $rootArray = $xmlread->toArray();
    print_r($rootArray);
    unset($GLOBALS["tmp"]["flattenArray"]);
    $ar = flattenArray($rootArray);
    print_r($ar);
    for ($i = 0; $i < count($translator_XML); $i++) {
        $ar[$translator_phPIMap[$i]] = $rootArray[$translator_XML[$i]];
    }
    return $ar;
}
开发者ID:BackupTheBerlios,项目名称:webphpimap-svn,代码行数:17,代码来源:functions_calendar.php


示例6: analyseResourceTodo

function analyseResourceTodo($folder)
{
    $d = opendir($folder);
    while ($f = readdir($d)) {
        if ($f != "." && $f != ".." && str_replace(".svn", "", $f) != "") {
            $pimfile = str_replace("//", "/", $folder . "/" . $f);
            $fp = fopen($pimfile, "r");
            $c = "";
            while (!feof($fp)) {
                $c .= fgets($fp, 9999);
            }
            fclose($fp);
            $c = str_replace("\r", "\n", $c);
            $c = str_replace("\n\n", "\n", $c);
            verbose("Analysing '" . $pimfile . "'");
            $c = explode("\n", $c);
            for ($i = 0; $i < count($GLOBALS["fields"]["todo"]); $i++) {
                if ($GLOBALS["fields"]["todo"][$i] != "pimfile") {
                    ${$GLOBALS["fields"]["todo"][$i]} = "";
                }
            }
            for ($i = 0; $i < count($c); $i++) {
                if (strtoupper(substr($c[$i], 0, 4)) == "UID:") {
                    $x = explode(":", $c[$i]);
                    $uid = $x[1];
                }
                if (strtoupper(substr($c[$i], 0, 3)) == "DUE") {
                    $x = explode(":", $c[$i]);
                    $due = checkTimeStamp(str_replace("T", "", str_replace("Z", "", $x[1])));
                }
                if (strtoupper(substr($c[$i], 0, 7)) == "SUMMARY") {
                    $x = explode(":", $c[$i]);
                    $summary = $x[1];
                }
            }
            $id = count($GLOBALS["restree"]["todo"]);
            for ($i = 0; $i < count($GLOBALS["fields"]["todo"]); $i++) {
                $GLOBALS["restree"]["todo"][$id][$GLOBALS["fields"]["todo"][$i]] = ${$GLOBALS["fields"]["todo"][$i]};
            }
            $GLOBALS["restree"]["todo"][$id][internalid] = $id;
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:webphpimap-svn,代码行数:43,代码来源:functions_todo.php


示例7: main

function main($argc, $argv)
{
    if ($argc < 2 || $argc > 3) {
        usage($argv[0]);
    }
    // Als '-v' is meegegeven tijdens het starten, ga in verbose mode
    if ($argv[1] == '-v') {
        verbose(true);
        $argc--;
        array_shift($argv);
    } else {
        verbose(false);
    }
    // Reader voor de XML-bestanden
    $reader = new KnowledgeBaseReader();
    // Parse een xml-bestand (het eerste argument) tot knowledge base
    $state = $reader->parse($argv[1]);
    // Start de solver, dat ding dat kan infereren
    $solver = new Solver();
    // leid alle goals in de knowledge base af.
    $goals = $state->goals;
    // Begin met de doelen die we hebben op de goal stack te zetten
    foreach ($goals as $goal) {
        $state->goalStack->push($goal->name);
    }
    // Zo lang we nog vragen kunnen stellen, stel ze
    while (($question = $solver->solveAll($state)) instanceof AskedQuestion) {
        $answer = cli_ask($question);
        if ($answer instanceof Option) {
            $state->apply($answer->consequences, Yes::because("User answered '{$answer->description}' to '{$question->description}'"));
        }
    }
    // Geen vragen meer, print de gevonden oplossingen.
    foreach ($goals as $goal) {
        printf("%s: %s\n", $goal->description, $goal->answer($state)->description);
    }
}
开发者ID:Nr90,项目名称:kennissysteem,代码行数:37,代码来源:main.php


示例8: evaluate

function evaluate($question, $answer)
{
    eval('$x=' . filter($answer));
    $res = " " . $question[0];
    for ($i = 1; $i < strlen($question); ++$i) {
        if ($question[$i] == "X" and is_numeric($question[$i - 1])) {
            $res .= "*X";
        } else {
            $res .= $question[$i];
        }
    }
    $res = preg_replace("/(\\d+|X)\\s*\\^\\s*(.*?)\\s/", "pow(\$1,\$2)", $res);
    $res = str_replace("X", '$x', $res);
    $question = filter($res);
    if (!$question) {
        return null;
    }
    $question = str_replace("=", '==', $question);
    if (verbose()) {
        echo $question . PHP_EOL;
    }
    eval('$res=' . $question);
    return $res;
}
开发者ID:p2004a,项目名称:CTF,代码行数:24,代码来源:quiz.php


示例9: die_usage

$GLOBALS["isVerbose"] = $argv[2] == "--verbose" ? true : false;
if (!$filePtr) {
    die_usage("Error : file not found.");
}
$csv = array_map('str_getcsv', $filePtr);
$total = 0;
$success = 0;
foreach ($csv as $key => $row) {
    $address = trim($row[0]);
    $address = str_replace(';', ' ', $address);
    $address = preg_replace('!\\s+!', ' ', $address);
    verbose("Looking for : {$address}");
    $geo = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address=' . urlencode($address) . '&sensor=false');
    $geo = json_decode($geo, true);
    if ($geo['status'] = 'OK') {
        $success++;
        verbose("Found !");
        $latitude = $geo['results'][0]['geometry']['location']['lat'];
        $longitude = $geo['results'][0]['geometry']['location']['lng'];
        verbose("Longitude : {$longitude}");
        verbose("Latitude : {$latitude}");
        csv_line("{$latitude};{$longitude}");
    } else {
        verbose("Not found !");
        csv_line(";");
    }
    $total++;
    sleep(1);
}
verbose("Result : {$success} / {$total} founded.");
开发者ID:Olousouzian,项目名称:Faemben,代码行数:30,代码来源:Faemben.php


示例10: json_decode

$games = json_decode($json, true);
$iso = $games[$id]['iso'];
$title = $games[$id]['title'];
echo "<p>";
/* mount the virtual iso */
verbose("Attempting to mount {$title} in \"{$mountfuse}\"");
mount($iso);
/* list all files */
$files = listFiles($iso);
verbose("Cleaning \"{$patch}\"");
clean($patch);
verbose("Initialising \"{$patch}\"");
init($patch);
verbose("Duplicating file structure in \"{$patch}\"");
createSymlinkStructure($files);
verbose("Collecting XML files");
$compatiblexmls = getCompatibleXML($id);
foreach ($compatiblexmls as $compatiblexml) {
    $xml = simplexml_load_file($compatiblexml);
    foreach ($_POST as $option => $patchesraw) {
        if (!empty($patchesraw)) {
            $patches = explode(";", $patchesraw);
            foreach ($patches as $patch) {
                $patchnode = $xml->xpath("./patch[@id='{$patch}']");
                if (count($patchnode) > 0) {
                    foreach ($patchnode[0] as $replacementnode) {
                        switch ($replacementnode->getName()) {
                            case "file":
                                filePatch($replacementnode['disc'], $replacementnode['external']);
                                break;
                            case "folder":
开发者ID:ZehCariocaRj,项目名称:dolphiilution-web,代码行数:31,代码来源:patchbrak.php


示例11: analyseResourceContact

function analyseResourceContact($folder)
{
    $d = opendir($folder);
    while ($f = readdir($d)) {
        if ($f != "." && $f != ".." && str_replace(".svn", "", $f) != "") {
            $pimfile = str_replace("//", "/", $folder . "/" . $f);
            $fp = fopen($pimfile, "r");
            $c = "";
            while (!feof($fp)) {
                $c .= fgets($fp, 9999);
            }
            fclose($fp);
            $c = str_replace("\r", "\n", $c);
            $c = str_replace("\n\n", "\n", $c);
            verbose("Analysing '" . $pimfile . "'");
            $c = explode("\n", $c);
            for ($i = 0; $i < count($GLOBALS["fields"]["contact"]); $i++) {
                if ($GLOBALS["fields"]["contact"][$i] != "pimfile") {
                    ${$GLOBALS["fields"]["contact"][$i]} = "";
                }
            }
            for ($i = 0; $i < count($c); $i++) {
                if (strtoupper(substr($c[$i], 0, 4)) == "UID:") {
                    $x = explode(":", $c[$i]);
                    $uid = $x[1];
                }
                if (strtoupper(substr($c[$i], 0, 2)) == "N:") {
                    $x = explode(":", $c[$i]);
                    $x = explode(";", $x[1]);
                    $surname = $x[0];
                    $firstname = $x[1];
                }
                if (strtoupper(substr($c[$i], 0, 5)) == "BDAY:") {
                    $x = explode(":", $c[$i]);
                    $birthday = checkTimeStamp(str_replace("T", "", str_replace("Z", "", $x[1])));
                }
                if (strtoupper(substr($c[$i], 0, 6)) == "EMAIL:") {
                    $x = explode(":", $c[$i]);
                    $email = $x[1];
                }
                if (strtoupper(substr($c[$i], 0, 4)) == "URL:") {
                    $x = explode(":", $c[$i]);
                    $url = $x[1];
                }
                if (strtoupper(substr($c[$i], 0, 6)) == "TITLE:") {
                    $x = explode(":", $c[$i]);
                    $title = $x[1];
                }
                if (strtoupper(substr($c[$i], 0, 4)) == "ORG:") {
                    $x = explode(":", $c[$i]);
                    $organization = $x[1];
                }
                if (strtoupper(substr($c[$i], 0, 5)) == "NOTE:") {
                    $x = explode(":", $c[$i]);
                    $note = $x[1];
                }
                if (strtoupper(substr($c[$i], 0, 4)) == "TEL;") {
                    $x = explode(";", $c[$i]);
                    for ($y = 0; $y < count($x); $y++) {
                        $nr = explode(":", $x[$y]);
                        switch ($nr[0]) {
                            case "TYPE=HOME":
                                $telephone = $nr[1];
                                break;
                            case "TYPE=VOICE":
                                $mobilephone = $nr[1];
                                break;
                            case "TYPE=CELL":
                                $cellphone = $nr[1];
                                break;
                            case "TYPE=FAX":
                                $fax = $nr[1];
                                break;
                        }
                    }
                }
            }
            $id = count($GLOBALS["restree"]["contact"]);
            for ($i = 0; $i < count($GLOBALS["fields"]["contact"]); $i++) {
                $GLOBALS["restree"]["contact"][$id][$GLOBALS["fields"]["contact"][$i]] = ${$GLOBALS["fields"]["contact"][$i]};
            }
            $GLOBALS["restree"]["contact"][$id][internalid] = $id;
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:webphpimap-svn,代码行数:85,代码来源:functions_contact.php


示例12: RetrieveVar

}
if (RetrieveVar("calorientation", "0111")) {
    $_SESSION["calorientation"] = RetrieveVar("calorientation", "0111");
} elseif ($_SESSION["calorientation"] == "") {
    $_SESSION["calorientation"] = TimeStamp(0);
}
$time = TimeStamp2Time($_SESSION["calorientation"]);
$prevyear = date("YmdHis", mktime(0, 0, 0, date("m", $time), date("d", $time), date("Y", $time) - 1));
$prevmonth = date("YmdHis", mktime(0, 0, 0, date("m", $time) - 1, date("d", $time), date("Y", $time)));
$nextyear = date("YmdHis", mktime(0, 0, 0, date("m", $time), date("d", $time), date("Y", $time) + 1));
$nextmonth = date("YmdHis", mktime(0, 0, 0, date("m", $time) + 1, date("d", $time), date("Y", $time)));
$GLOBALS["calendar"]["month"] = date("m", $time);
$GLOBALS["calendar"]["start"] = date("YmdHis", mktime(0, 0, 0, date("m", $time), 1, date("Y", $time)));
$GLOBALS["calendar"]["end"] = date("YmdHis", mktime(23, 59, 59, date("m", $time), date("t", $time), date("Y", $time)));
verbose("Orientiert an Timestamp: " . $time . ", Monat ist " . $GLOBALS["calendar"]["month"]);
verbose("Monat geht von " . $GLOBALS["calendar"]["start"] . " bis " . $GLOBALS["calendar"]["end"]);
$selection = $GLOBALS["restree"]["calendar"];
$selection1 = filterResources($selection, "to", $GLOBALS["calendar"]["start"], ">=", null);
$selection1x = filterResources($selection1, "to", $GLOBALS["calendar"]["end"], "<=", null);
$selection2 = filterResources($selection, "from", $GLOBALS["calendar"]["end"], "<=", null);
$selection2x = filterResources($selection2, "from", $GLOBALS["calendar"]["start"], ">=", null);
$selection = mergeSelections($selection1x, $selection2x);
for ($i = 0; $i < count($selection); $i++) {
    $hasevent[date("j", TimeStamp2Time($selection[$i]["from"]))] = true;
}
append("<table border=\"1\" id=\"minical\" name=\"minical\">\n");
append("     <tr class=\"calnavi\">\n");
append("          <td>&nbsp;</td>\n");
append("          <td><a href=\"?module=calendar&calorientation=" . $prevyear . "\">&lt;&lt;</a></td>\n");
append("          <td><a href=\"?module=calendar&calorientation=" . $prevmonth . "\">&lt;</a></td>\n");
append("          <td colspan=\"3\">\n" . "               <a href=\"?module=calendar&calrange=month\">\n" . $GLOBALS["calendar"]["month"] . " " . date("M", $time) . "</a>\n" . "          </td>\n");
开发者ID:BackupTheBerlios,项目名称:webphpimap-svn,代码行数:31,代码来源:list.calendar.php


示例13: file_put_contents

        }
    }
    if ($version) {
        file_put_contents("{$css_dest}/min.bundle-v{$version}.css", $mergedCss);
    } else {
        file_put_contents("{$css_dest}/min.bundle.css", $mergedCss);
    }
    if ($css_header_file) {
        $csshdrt = "{$mini_css_conditional_if}\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"{$http_css}/min.bundle";
        if ($version) {
            $csshdrt .= "-v{$version}";
        }
        $csshdrt .= ".css\" />\n{$mini_css_conditional_else}\n{$csshdr}{$mini_css_conditional_end}\n";
        file_put_contents($css_header_file, $csshdrt);
    }
    verbose(" done\n\n");
}
if ($version && !$js_header_file) {
    echo "\n\n****** VERSION NUMBER WAS SPECIFIED - DON'T FORGET TO UPDATE HEADER FILES!! ******\n\n";
}
function verbose($msg)
{
    global $verbose;
    if ($verbose) {
        print $msg;
    }
}
function print_version($mini = true)
{
    echo "\nMinify V" . VERSION . "- A JS and CSS minifier for projects using the Smarty PHP templating engine\n\nCopyright (c) 2010 - 2012, Open Source Solutions Limited, Dublin, Ireland - http://www.opensolutions.ie\nReleased under the BSD License.\n";
    if (!$mini) {
开发者ID:opensolutions,项目名称:minify,代码行数:31,代码来源:minify.php


示例14: filePatch

function filePatch($disc, $external)
{
    global $sd;
    global $patchfiles;
    if (file_exists($patchfiles . $disc)) {
        unlink($patchfiles . $disc);
    }
    symlink($sd . $external, $patchfiles . $disc);
    verbose("Linked \"{$sd}{$external}\" to \"{$patchfiles}{$disc}\"");
}
开发者ID:ZehCariocaRj,项目名称:dolphiilution-web,代码行数:10,代码来源:index.php


示例15: get_directory_list

     $files = get_directory_list($olddir);
     if (empty($files)) {
         continue;
     }
     // Create new user directory
     if (!($newdir = make_user_directory($userid))) {
         // some weird directory - do not stop the upgrade, just ignore it
         continue;
     }
     // Move contents of old directory to new one
     if (file_exists($olddir) && file_exists($newdir)) {
         $restored = false;
         foreach ($files as $file) {
             if (!file_exists($newdir . '/' . $file)) {
                 copy($olddir . '/' . $file, $newdir . '/' . $file);
                 verbose("Moved {$olddir}/{$file} into {$newdir}/{$file}");
                 $restored = true;
             }
         }
         if ($restored) {
             $restored_count++;
         }
     } else {
         notify("Could not move the contents of {$olddir} into {$newdir}!");
         $result = false;
         break;
     }
 }
 if ($settings['eolchar'] == '<br />') {
     print_box_start('generalbox centerpara');
 }
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:31,代码来源:fixuserpix.php


示例16: data_cleanup

/**
 * Attempts to delete all generated test data. A few conditions are required for this to be successful:
 *   1. If a database-prefix has been given, tables with this prefix must exist
 *   2. If a data prefix has been given (e.g. test_), test data must contain this prefix in their unique identifiers (not PKs)
 * The first method is safest, because it will not interfere with existing tables, but you have to create all the tables yourself.
 */
function data_cleanup()
{
    global $settings, $tables, $DB;
    if ($settings['quiet']) {
        ob_start();
    }
    if (!is_null($settings['database-prefix']) && isset($tables)) {
        // Truncate test tables if a specific db prefix was given
        foreach ($tables as $table_name) {
            // Don't empty a few tables
            if (!in_array($table_name, array('modules', 'block'))) {
                if ($DB->delete_records($table_name)) {
                    verbose("Truncated table {$table_name}");
                } else {
                    verbose("Could not truncate table {$table_name}");
                    if (!$settings['ignore-errors']) {
                        die;
                    }
                }
            }
        }
    } else {
        // Delete records in normal tables if no specific db prefix was given
        $courses = $DB->get_records_select('course', "idnumber LIKE ?", array("{$settings['data-prefix']}%"), null, 'id');
        if (is_array($courses) && count($courses) > 0) {
            foreach ($courses as $course) {
                if (!delete_course($course->id, false)) {
                    verbose("Could not delete course {$course->id} or some of its associated records from the database.");
                    if (!$settings['ignore-errors']) {
                        die;
                    }
                } else {
                    verbose("Deleted course {$course->id} and all associated records from the database.");
                }
            }
        }
        verbose("Deleting test users (permanently)...");
        if (!$DB->delete_records_select('user', "username LIKE ?", array("{$settings['data-prefix']}%"))) {
            verbose("Error deleting users from the database");
            if (!$settings['ignore-errors']) {
                die;
            }
        }
    }
    if ($settings['quiet']) {
        ob_end_clean();
    }
}
开发者ID:nicolasconnault,项目名称:moodle-data-generator,代码行数:54,代码来源:generator.php


示例17: get_direction_to_append

 function get_direction_to_append($cid)
 {
     verbose(2, "ENTERING function get_direction_to_append().");
     verbose(2, "-- cid is " . $cid);
     $circle_lvl = 1;
     $max_const_per_level = 4;
     if ($cid > 4) {
         while ($max_const_per_level < $cid) {
             $circle_lvl += 2;
             $max_const_per_level += $circle_lvl * 4;
         }
         $max_const_from_previous_level = $max_const_per_level - $circle_lvl * 4;
     } else {
         $max_const_from_previous_level = 0;
     }
     $direction = ($cid - $max_const_from_previous_level) / $circle_lvl;
     verbose(2, "-- circle_lvl is " . $circle_lvl);
     verbose(2, "-- max_const_from_previous_level is " . $max_const_from_previous_level);
     verbose(2, "-- direction is " . $direction);
     if ($direction < 1) {
         verbose(1, "-- new constellation will be appended ABOVE\n");
         return "HOCH";
     } elseif ($direction < 2) {
         verbose(1, "-- new constellation will be appended RIGHT\n");
         return "RECHTS";
     } elseif ($direction < 3) {
         verbose(1, "-- new constellation will be appended BELOW\n");
         return "RUNTER";
     } else {
         verbose(1, "-- new constellation will be appended LEFT\n");
         return "LINKS";
     }
 }
开发者ID:spaceregents,项目名称:spaceregents,代码行数:33,代码来源:class_god.inc.php


示例18: msql_adm

function msql_adm($msql = '')
{
    //echo br();
    $root = sesm('root', 'msql/');
    $auth = $_SESSION['auth'];
    $ath = 6;
    //auth_level_mini
    $wsz = define_s('wsz', 700);
    $msql = $msql ? $msql : $_GET['msql'];
    $_SESSION['page'] = $_GET['page'] ? $_GET['page'] : 1;
    #boot
    if ($msql && $msql != '=') {
        $url = sesm('url', '/msql/');
        $ra = msql_boot($msql);
        $_SESSION['msql_boot'] = $ra;
        list($bases, $base, $dirs, $dir, $prefixes, $prefix, $files, $table, $version, $folder, $node) = $ra;
        //build url
        $murl = sesm('murl', murl($base, $dir, $prefix, $table, $version));
        //b/d/p_t_v
        $basename = $root . $folder . $node;
        $is_file = is_file($basename . '.php');
        $lk = sesm('lk', $url . $folder . $node . gpage());
        $folder = $root . $folder;
        //conformity
        msql_adm_head($lk, $base, $prefix, $table, $version);
    }
    $def = ajx($_POST['def'] ? $_POST['def'] : $_GET['def'], 1);
    if ($_GET['see']) {
        $ret[] = verbose($ra, 'dirs');
    }
    //auth
    if ($base == 'users' && $prefix == $_SESSION['USE']) {
        $_SESSION['ex_atz'] = 1;
    }
    if ($auth >= $ath && $_SESSION['ex_atz'] or $auth >= 6) {
        $authorized = true;
    }
    $lkb = $lk . '&';
    #load
    //reqp('msql'); $msq=new msql($base,$node); if($is_file)$defs=$msq->load();
    if (get('repair')) {
        msql_repair($folder, $node);
    }
    //old
    if ($is_file) {
        $defs = read_vars($folder, $node, $defsb);
    }
    //if(!$defs)$ret[]=verbose($ra,'');
    if ($defs['_menus_']) {
        $defsb['_menus_'] = $defs['_menus_'];
    }
    //save
    if ($def && !$defs[$def]) {
        $_POST['add'] = $def;
    }
    if (($_POST['def'] or $_POST['add']) && $authorized) {
        list($defs, $def) = save_defs($folder, $node, $defs, $def, $base);
    }
    //savb
    if ($_GET['sav']) {
        save_vars($folder, $node . '_sav', $defs, 1);
    }
    //create
    if ($_GET['create'] && $authorized) {
        $prefix = normaliz_c($_POST['prfx']);
        $table = normaliz_c($_POST['hbname']);
        if ($_POST['hbnb'] && $_POST['hbnb'] != 'version') {
            $version = $_POST['hbnb'];
        }
        if (!$_POST['hbnb']) {
            $version = '';
        }
        if (is_numeric($_POST['nbc'])) {
            $defsb['_menus_'] = '';
            $nbc = $_POST['nbc'];
            $nbc = $nbc > 1 ? $nbc : 1;
            for ($i = 1; $i <= $nbc; $i++) {
                $defsb['_menus_'][] = 'col_' . $i;
            }
        } elseif ($defs['_menus_']) {
            $defsb['_menus_'] = $defs['_menus_'];
        } else {
            $defsb['_menus_'] = array('');
        }
        $node = mnod($prefix, $table, $version);
        if ($folder && $prefix) {
            read_vars($folder, $node, $defsb);
        }
        relod(sesm('url') . murl_build('', '', $prefix, $table, $version));
    }
    #modifs
    //save_modif
    $do = find_command();
    if ($do && $auth >= $ath) {
        $defs = msql_modifs($defs, $defsb, $folder, $prefix . '_' . $table, $node, $basename, $do);
    }
    #render
    $lh = sesmk('msqlang');
    #-menus
    if (!$_GET['def']) {
//.........这里部分代码省略.........
开发者ID:philum,项目名称:cms,代码行数:101,代码来源:msql.php


示例19: array

// Build our array of files we need to parse
$files = array();
foreach ($output as $file) {
    if (strlen($file) > 2) {
        $file = substr($file, 2);
        if (is_file($file)) {
            $parts = pathinfo($file);
            if (!isset($parts['extension']) || !in_array($parts['extension'], $php_extensions)) {
                verbose("Not a known php extension for file: '{$file}'");
                continue;
            }
            verbose("Checking PHP Syntax for: '{$file}'...");
            $output = array();
            exec('/usr/bin/php -l ' . escapeshellarg($file), $output, $retval);
            if ($retval === 0) {
                verbose("  Successfully passed PHP Lint Check!");
            } else {
                echo "PHP Parsing Error Detected in file '{$file}'\n----------";
                echo implode("\n", $output) . "\n----------\n";
                $fail = TRUE;
            }
        }
    }
}
// If any file failed, return failure so it doesn't commit
if ($fail) {
    exit(255);
}
exit(0);
/**
 * Verbose output if enabled
开发者ID:kenguest,项目名称:Mercurial-Hooks,代码行数:31,代码来源:php-lint-check-pretxncommit.php


示例20: store_cache

         }
         $serp_data['keyword'] = $keyword;
         $serp_data['cc'] = $country_data['cc'];
         $serp_data['lc'] = $country_data['lc'];
         $serp_data['result_count'] = $result_count;
         store_cache($serp_data, $search_string, $page, $country_data);
         // store results into local cache
     }
     if ($process_result != "PROCESS_SUCCESS_MORE") {
         break;
     }
     // last page
     if (!$load_all_ranks) {
         for ($n = 0; $n < $result_count; $n++) {
             if (strstr($results[$n]['url'], $test_website_url)) {
                 verbose("Located {$test_website_url} within search results.{$NL}");
                 break;
             }
         }
     }
 }
 // scrape clause
 $result_count = $serp_data['result_count'];
 for ($ref = 0; $ref < $result_count; $ref++) {
     $rank++;
     $rank_data[$keyword][$rank]['title'] = $serp_data[$ref]['title'];
     $rank_data[$keyword][$rank]['url'] = $serp_data[$ref]['url'];
     $rank_data[$keyword][$rank]['host'] = $serp_data[$ref]['host'];
     //$rank_data[$keyword][$rank]['desc']=$serp_data['desc'']; // not really required
     if (strstr($rank_data[$keyword][$rank]['url'], $test_website_url)) {
         $info = array();
开发者ID:rayhon,项目名称:tech-blog,代码行数:31,代码来源:google-rank-checker.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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