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


PHP show_help函数代码示例

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


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

示例1: check_parameter

function check_parameter($argv_param)
{
    global $clear, $is_forced;
    switch ($argv_param) {
        case '-c':
        case '--clear':
            $clear = true;
            break;
        case '-f':
        case '--force':
            $is_forced = true;
            break;
        case '-cf':
        case '-fc':
            $is_forced = true;
            $clear = true;
            break;
        case '-h':
        case '--help':
            show_help();
            exit;
        default:
            echo 'Incorrect parameter name';
            exit;
    }
}
开发者ID:ClearcodeHQ,项目名称:cc-skeletons,代码行数:26,代码来源:cli.php

示例2: getBookmarksFile

/**
 * Get the bookmarks file as a string
 *
 * Uses the -f or --file parameter to open and read a
 * a bookmarks file
 *
 * @return string Contents of the file
 */
function getBookmarksFile()
{
    $filename = get_option_value('f', 'file');
    if (empty($filename)) {
        show_help();
        exit(1);
    }
    if (!file_exists($filename)) {
        // TRANS: Exception thrown when a file upload cannot be found.
        // TRANS: %s is the file that could not be found.
        throw new Exception(sprintf(_m('No such file "%s".'), $filename));
    }
    if (!is_file($filename)) {
        // TRANS: Exception thrown when a file upload is incorrect.
        // TRANS: %s is the irregular file.
        throw new Exception(sprintf(_m('Not a regular file: "%s".'), $filename));
    }
    if (!is_readable($filename)) {
        // TRANS: Exception thrown when a file upload is not readable.
        // TRANS: %s is the file that could not be read.
        throw new Exception(sprintf(_m('File "%s" not readable.'), $filename));
    }
    // TRANS: %s is the filename that contains a backup for a user.
    printfv(_m('Getting backup from file "%s".') . "\n", $filename);
    $html = file_get_contents($filename);
    return $html;
}
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:35,代码来源:importbookmarks.php

示例3: show_options

function show_options(array $commands = array())
{
    drush_print(t('Please type one of the following options to continue:'));
    show_help($commands);
    $handle = fopen("php://stdin", "r");
    $line = fgets($handle);
    run(trim($line), $commands);
}
开发者ID:NYULibraries,项目名称:dlts_viewer_distro,代码行数:8,代码来源:export.php

示例4: perform

function perform($callback)
{
    global $list, $argv;
    $args = $argv;
    array_shift($args);
    $list = parse_list('images.lst');
    if (!$list) {
        die("Hubo un error\n");
    }
    function show_help()
    {
        global $list;
        echo "Ficheros:\n";
        echo implode(', ', array_keys($list));
        echo "\n";
        exit;
    }
    if (!sizeof($args)) {
        show_help();
    }
    $total = 0;
    $error = 0;
    foreach ($args as $ac) {
        if ($ac == '*') {
            $ac = array_keys($list);
        } else {
            $ac = array($ac);
        }
        foreach ($ac as $c) {
            $cc =& $list[$c];
            if (!isset($cc)) {
                echo "No existe '{$c}'\n";
                continue;
            }
            try {
                if (!$callback($c, $cc)) {
                    $error++;
                }
            } catch (Exception $e) {
                echo $e;
                $error++;
            }
            $total++;
        }
    }
    printf("----------------------\n");
    printf("Total procesados: %d\n", $total);
    printf("Total errores   : %d\n", $error);
}
开发者ID:AdmiralCurtiss,项目名称:talestra,代码行数:49,代码来源:common.php

示例5: show_byday2

function show_byday2($tmin, $tmax, $link)
{
    $result = mysql_query("select distinct u.login as uname, d.id as id, count(d.size) as _count, sum(d.size) as _ssize from detail d, users u where d.u_id=u.id and utime<{$tmax} and utime>{$tmin} group by u_id order by _ssize desc;", $link);
    $mod_name = "day stat, daily leve2";
    show_head();
    show_help();
    //    echo "select distinct u.login as uname, sum(d.size) as _ssize from detail d, users u where d.u_id=u.id and utime<$tmax and utime>$tmin group by u_id;";
    echo "<br>" . strftime("%d %B, %T", (int) $tmin) . "-" . strftime("%d, %B %T", (int) $tmax) . " ";
    echo "<HR NOSHADE COLOR=#000000 SIZE=1>\n<BR>\n";
    echo "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n      <TR><TD BGCOLOR=#93BEE2>\n      <TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1>\n         <TR VALIGN=TOP ALIGN=CENTER>\n            <TD HEIGHT=15>login</TD>\n            <TD><B>count</B></TD>\n            <TD><B>bytes</B></TD>\n            </TR>";
    $max = mysql_num_rows($result);
    for ($i = 0; $i < $max; $i++) {
        $login = @mysql_result($result, $i, "uname");
        $uid = @mysql_result($result, $i, "id");
        $size = @mysql_result($result, $i, "_ssize");
        $count = @mysql_result($result, $i, "_count");
        echo "<TR BGCOLOR=#FFF7E5 ALIGN=RIGHT>\n\t<td>{$login}</td>\n\t<td>" . dotize($count) . "</a></td>\n\t<td>" . dotize($size) . "</a></td>\n\t</tr>";
    }
}
开发者ID:digideskio,项目名称:sacc1,代码行数:19,代码来源:bydate.php

示例6: getBookmarksFile

/**
 * Get the bookmarks file as a string
 * 
 * Uses the -f or --file parameter to open and read a
 * a bookmarks file
 *
 * @return string Contents of the file
 */
function getBookmarksFile()
{
    $filename = get_option_value('f', 'file');
    if (empty($filename)) {
        show_help();
        exit(1);
    }
    if (!file_exists($filename)) {
        throw new Exception("No such file '{$filename}'.");
    }
    if (!is_file($filename)) {
        throw new Exception("Not a regular file: '{$filename}'.");
    }
    if (!is_readable($filename)) {
        throw new Exception("File '{$filename}' not readable.");
    }
    // TRANS: %s is the filename that contains a backup for a user.
    printfv(_("Getting backup from file '%s'.") . "\n", $filename);
    $html = file_get_contents($filename);
    return $html;
}
开发者ID:microcosmx,项目名称:experiments,代码行数:29,代码来源:importbookmarks.php

示例7: getActivityStreamDocument

function getActivityStreamDocument()
{
    $filename = get_option_value('f', 'file');
    if (empty($filename)) {
        show_help();
        exit(1);
    }
    if (!file_exists($filename)) {
        throw new Exception("No such file '{$filename}'.");
    }
    if (!is_file($filename)) {
        throw new Exception("Not a regular file: '{$filename}'.");
    }
    if (!is_readable($filename)) {
        throw new Exception("File '{$filename}' not readable.");
    }
    // TRANS: Commandline script output. %s is the filename that contains a backup for a user.
    printfv(_("Getting backup from file '%s'.") . "\n", $filename);
    $xml = file_get_contents($filename);
    return $xml;
}
开发者ID:microcosmx,项目名称:experiments,代码行数:21,代码来源:restoreuser.php

示例8: getAtomFeedDocument

function getAtomFeedDocument()
{
    $filename = get_option_value('f', 'file');
    if (empty($filename)) {
        show_help();
        exit(1);
    }
    if (!file_exists($filename)) {
        throw new Exception("No such file '{$filename}'.");
    }
    if (!is_file($filename)) {
        throw new Exception("Not a regular file: '{$filename}'.");
    }
    if (!is_readable($filename)) {
        throw new Exception("File '{$filename}' not readable.");
    }
    $xml = file_get_contents($filename);
    $dom = DOMDocument::loadXML($xml);
    if ($dom->documentElement->namespaceURI != Activity::ATOM || $dom->documentElement->localName != 'feed') {
        throw new Exception("'{$filename}' is not an Atom feed.");
    }
    return $dom;
}
开发者ID:microcosmx,项目名称:experiments,代码行数:23,代码来源:importtwitteratom.php

示例9: str_replace

}
/***********************************************************************************/
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include "PP_header.php";
// #### HELP SECTION
show_help('list_payment_methods');
// #### PAYMENT METHOD SECTION
echo $PAYMENT_METHOD;
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
    $_SESSION["menu"] = $_GET["menu"];
}
$HD_Form->create_form($form_action, $list, $id = null);
// #### FOOTER SECTION
include 'PP_footer.php';
开发者ID:sayemk,项目名称:a2billing,代码行数:31,代码来源:A2B_entity_payment_configuration.php

示例10: snmp_walk

function snmp_walk($snmp_host, $snmp_community, $snmp_oid, $snmp_version)
{
    if (extension_loaded("snmp")) {
        if ($snmp_version == "1") {
            if ($snmp_return = @snmpwalk($snmp_host, $snmp_community, $snmp_oid)) {
                return $snmp_return;
            } else {
                show_help("SNMP");
            }
        } else {
            if ($snmp_version == "2c" || $snmp_version == "2") {
                if ($snmp_return = @snmp2_walk($snmp_host, $snmp_community, $snmp_oid)) {
                    return $snmp_return;
                } else {
                    show_help("SNMP");
                }
            } else {
                show_help("SNMP");
            }
        }
    } else {
        show_help("SNMP_MODULE");
    }
}
开发者ID:hariharansubramanian,项目名称:nagios-config,代码行数:24,代码来源:check_usolved_disks.php

示例11: get_option_value

Attempts a User Stream connection to Twitter as the given user, dumping
data as it comes.

ENDOFHELP;
require_once INSTALLDIR . '/scripts/commandline.inc';
if (have_option('n')) {
    $nickname = get_option_value('n');
} else {
    if (have_option('nick')) {
        $nickname = get_option_value('nickname');
    } else {
        if (have_option('all')) {
            $nickname = null;
        } else {
            show_help($helptext);
            exit(0);
        }
    }
}
/**
 *
 * @param User $user 
 * @return TwitterOAuthClient
 */
function twitterAuthForUser(User $user)
{
    $flink = Foreign_link::getByUserID($user->id, TWITTER_SERVICE);
    $token = TwitterOAuthClient::unpackToken($flink->credentials);
    if (!$token) {
        throw new ServerException("No Twitter OAuth credentials for this user.");
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:30,代码来源:fakestream.php

示例12: str_replace

$HD_Form->init();
if (cardid != '' || !is_null($cardid)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$cardid}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include 'PP_header.php';
// #### HELP SECTION
show_help("money_situation");
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
    $_SESSION["menu"] = $_GET["menu"];
}
?>
<br>
<script language="javascript">
function go(URL)
{
	if ( Check() )
	{
		
开发者ID:sayemk,项目名称:a2billing,代码行数:30,代码来源:A2B_entity_invoices_billed.php

示例13: Header

    Header("Location: PP_error.php?c=accessdenied");
    die;
}
/***********************************************************************************/
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include "PP_header.php";
// #### HELP SECTION
show_help('view_payment');
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
    $_SESSION["menu"] = $_GET["menu"];
}
$HD_Form->create_form($form_action, $list, $id = null);
// #### FOOTER SECTION
include "PP_footer.php";
开发者ID:sayemk,项目名称:a2billing,代码行数:31,代码来源:A2B_entity_payment.php

示例14: _

</td>
		<td>
			<input id="machine_id" type="text" required size="40" name="machine_id" saved-value="<?php 
echo $machine_id;
?>
" value="<?php 
echo $machine_id;
?>
"/>
		</td>
	</tr>
</table>
</form>
</div>
<h2><?php 
echo _("Module Administration");
?>
</h2>
<div id="shield_link_div">
	<a href="#" id="show_auto_update" title="<?php 
echo _("Click to configure Update Notifications");
?>
"><span id="shield_link" class="<?php 
echo $shield_class;
?>
"></span></a>
</div>
<?php 
if ($edgemode) {
    echo show_help(sprintf(_("This system has edge mode enabled. This means you will get modules as they are released and may encounter bugs not seen in general availibility modules.</br> For more information visit %s"), '<a href="http://wiki.freepbx.org/x/boi3Aw">http://wiki.freepbx.org/x/boi3Aw</a>'), _("EDGE MODE"));
}
开发者ID:lidl,项目名称:framework,代码行数:31,代码来源:header.php

示例15: ttsengines_delete_engine

$enginename = false;
$enginepath = false;
// Handle adding/updating an engine
if ($_REQUEST['delete']) {
    ttsengines_delete_engine($_REQUEST['engineid']);
} else {
    if ($_POST['edit']) {
        ttsengines_update_engine($_POST['engineid'], $_POST['enginename'], $_POST['enginepath']);
    } else {
        if ($_POST['addengine']) {
            ttsengines_add_engine($_POST['enginename'], $_POST['enginepath']);
        }
    }
}
$engines = ttsengines_get_all_engines();
$info = show_help(_('On this page you can manage text to speech engines on your system. When you add an engine you give it a name, and the full path to the engine on your system. After doing this the engine will be available on the text to speech page.'));
$heading = _('Text to Speech Engines');
$delurl = '';
if (isset($edit)) {
    $data = \FreePBX::Ttsengines()->getEngine($edit);
    $enginename = isset($data['name']) ? $data['name'] : '';
    $enginepath = isset($data['path']) ? $data['path'] : '';
    $delurl = '?display=ttsengines&delete=true&engineid=' . $edit . '&edit=' . $edit;
}
?>
<div class="container-fluid">
	<h1><?php 
echo $heading;
?>
</h1>
		<?php 
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:31,代码来源:page.ttsengines.php


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