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


PHP cmdHelp函数代码示例

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


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

示例1: mainHTML

function mainHTML()
{
    global $schedulePID, $schedulePars, $debugString, $showLog;
    echo '<!DOCTYPE html>';
    echo '<html>';
    echo '<head>';
    echo '<meta name="viewport" content="width=550, initial-scale=1">';
    echo '<title>RPi Cam Download</title>';
    echo '<link rel="stylesheet" href="css/style_minified.css" />';
    echo '<link rel="stylesheet" href="' . getStyle() . '" />';
    echo '<script src="js/style_minified.js"></script>';
    echo '<script src="js/script.js"></script>';
    echo '</head>';
    echo '<body onload="schedule_rows()">';
    echo '<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">';
    echo '<div class="container">';
    echo '<div class="navbar-header">';
    if ($showLog) {
        echo '<a class="navbar-brand" href="schedule.php">';
    } else {
        echo '<a class="navbar-brand" href="' . ROOT_PHP . '">';
    }
    echo '<span class="glyphicon glyphicon-chevron-left"></span>Back - ' . CAM_STRING . '</a>';
    echo '</div>';
    echo '</div>';
    echo '</div>';
    echo '<div class="container-fluid">';
    echo '<form action="schedule.php" method="POST">';
    if ($debugString) {
        echo $debugString . "<br>";
    }
    if ($showLog) {
        echo "&nbsp&nbsp;<button class='btn btn-primary' type='submit' name='action' value='downloadlog'>" . BTN_DOWNLOADLOG . "</button>";
        echo "&nbsp&nbsp;<button class='btn btn-primary' type='submit' name='action' value='clearlog'>" . BTN_CLEARLOG . "</button><br><br>";
        displayLog();
    } else {
        echo '<div class="container-fluid text-center">';
        echo "&nbsp;&nbsp;<button class='btn btn-primary' type='submit' name='action' value='save'>" . BTN_SAVE . "</button>";
        echo "&nbsp;&nbsp;<button class='btn btn-primary' type='submit' name='action' value='backup'>" . BTN_BACKUP . "</button>";
        echo "&nbsp;&nbsp;<button class='btn btn-primary' type='submit' name='action' value='restore'>" . BTN_RESTORE . "</button>";
        echo "&nbsp;&nbsp;<button class='btn btn-primary' type='submit' name='action' value='showlog'>" . BTN_SHOWLOG . "</button>";
        echo '&nbsp;&nbsp;&nbsp;&nbsp;';
        if ($schedulePID != 0) {
            echo "<button class='btn btn-danger' type='submit' name='action' value='stop'>" . BTN_STOP . "</button>";
        } else {
            echo "<button class='btn btn-danger' type='submit' name='action' value='start'>" . BTN_START . "</button>";
        }
        echo "<br></div>";
        showScheduleSettings($schedulePars);
    }
    echo '</form>';
    echo '</div>';
    cmdHelp();
    echo '</body>';
    echo '</html>';
}
开发者ID:ElectroByt,项目名称:RPi_Cam_Web_Interface,代码行数:56,代码来源:schedule.php

示例2: usage

function usage($error = null, $helpsubject = null)
{
    global $progname, $all_commands;
    $stderr = fopen('php://stderr', 'w');
    if (PEAR::isError($error)) {
        fputs($stderr, $error->getMessage() . "\n");
    } elseif ($error !== null) {
        fputs($stderr, "{$error}\n");
    }
    if ($helpsubject != null) {
        $put = cmdHelp($helpsubject);
    } else {
        $put = "Commands:\n";
        $maxlen = max(array_map("strlen", $all_commands));
        $formatstr = "%-{$maxlen}s  %s\n";
        ksort($all_commands);
        foreach ($all_commands as $cmd => $class) {
            $put .= sprintf($formatstr, $cmd, PEAR_Command::getDescription($cmd));
        }
        $put .= "Usage: {$progname} [options] command [command-options] <parameters>\n" . "Type \"{$progname} help options\" to list all options.\n" . "Type \"{$progname} help shortcuts\" to list all command shortcuts.\n" . "Type \"{$progname} help <command>\" to get the help for the specified command.";
    }
    fputs($stderr, "{$put}\n");
    fclose($stderr);
    exit;
}
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:25,代码来源:pearcmd.php

示例3: cmdConsole

/**
 * cmdConsole()
 *
 * @param  array &$aryPear
 * @return void
 */
function cmdConsole(&$aryPear)
{
    foreach ($aryPear['opt'] as $sKey => $sValue) {
        switch ($sKey) {
            case 'e':
            case '--exec':
                cmdExec($sValue, $aryPear);
                exit;
            case 'u':
            case '--upgrade':
                cmdUpgrade($aryPear);
                exit;
            case '--package':
                cmdPackage($sValue);
                exit;
            case '--make_iplist':
                cmdMakeDoCoMoIpList($aryPear);
                cmdMakeEZwebIpList($aryPear);
                cmdMakeSoftBankIpList($aryPear);
                exit;
            case '--show_iplist':
                echo cmdShowIpList($aryPear) . "\n";
                exit;
            case '--make_map':
                cmdMakeDoCoMoMap($aryPear);
                cmdMakeSoftBankMap($aryPear);
                exit;
            case '--make_doc':
                echo cmdMakeDoc() . "\n";
                exit;
            case '--get_doc':
                cmdGetDoc($sValue);
                exit;
            case '--clean_doc':
                echo cmdCleanDoc() . "\n";
                exit;
            case '--clean_cache':
                echo cmdCleanCache() . "\n";
                exit;
            case '--show_log':
                echo cmdShowLog($sValue) . "\n";
                exit;
            case '--clean_log':
                echo cmdCleanLog() . "\n";
                exit;
            case '--clean_tmp':
                echo cmdCleanTmp() . "\n";
                exit;
            case 'p':
            case '--phpinfo':
                phpinfo();
                exit;
            case 'i':
            case '--info':
                echo cmdBlockenInfo() . "\n";
                exit;
            default:
                break;
        }
    }
    echo cmdHelp() . "\n";
    exit;
}
开发者ID:syttru,项目名称:blocken-test,代码行数:69,代码来源:BlockenCommand.php


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