本文整理汇总了PHP中help函数的典型用法代码示例。如果您正苦于以下问题:PHP help函数的具体用法?PHP help怎么用?PHP help使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了help函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parse_options
function parse_options()
{
global $argv;
$avail_opts = array('--connection' => true, '--keep' => true, '--backup-dir' => true, '--exclude' => false);
$args = $argv;
array_shift($args);
if (empty($args[0]) || strpos(implode(" ", $argv), '--help') !== false) {
help();
}
$opts = array('extra' => '');
foreach ($args as $arg) {
$parts = explode('=', $arg);
if (count($parts) !== 2) {
$opts['extra'] .= ' ' . $arg;
continue;
}
list($opt, $value) = $parts;
if (isset($avail_opts[$opt])) {
$opt = ltrim($opt, '-');
$func_name = "parse_" . str_replace('-', '_', $opt);
$opts[$opt] = $func_name($value);
} else {
$opts['extra'] .= ' ' . $arg;
}
}
foreach ($avail_opts as $opt => $required) {
if ($required && !isset($opts[ltrim($opt, '-')])) {
error("Missing required option: {$opt}.");
}
}
$opts['tmp-dir'] = sys_get_temp_dir();
$opts += array('exclude' => array());
return $opts;
}
示例2: check
/**
* @fn check
* @param command line parameter
* index type array
* @return function object
*/
function check($prm)
{
try {
if (0 === count($prm)) {
/* cannnot find sub command */
throw new \err\SynxErr('cannnot find sub command');
}
/* varsion */
$ret_val = varsion($prm);
if (null !== $ret_val) {
return $ret_val;
}
/* help */
$ret_val = help($prm);
if (null !== $ret_val) {
return $ret_val;
}
/* sub command */
$ret_val = subcmd($prm);
if (null !== $ret_val) {
return $ret_val;
}
throw new \Exception();
} catch (\Exception $e) {
throw $e;
}
}
示例3: main
function main()
{
if ($_SERVER['argc'] > 1) {
$option = $_SERVER['argv'][1];
} else {
help();
}
switch ($option) {
case "install":
install();
break;
case "uninstall":
uninstall();
break;
case "newapp":
$_SERVER['argc'] != 3 and help();
newapp($_SERVER['argv'][2]);
break;
case "delapp":
$_SERVER['argc'] != 3 and help();
delapp($_SERVER['argv'][2]);
break;
case "help":
help();
break;
default:
help();
break;
}
}
示例4: stop
function stop($m = null)
{
if ($m) {
message($m);
echo PHP_EOL;
}
help();
exit(1);
}
示例5: render
public function render()
{
$routes = DaGdConfig::get('general.routemap');
$return = '';
$controllers_visited = array();
foreach ($routes as $path => $controller) {
if (in_array($controller, $controllers_visited)) {
continue;
}
$return .= help($controller);
$controllers_visited[] = $controller;
}
return $return;
}
示例6: executeCommand
function executeCommand($params, $chatID)
{
// Prepare an array of parameters without the command
for ($i = 1; $i < count($params); $i++) {
$parameters[$i - 1] = $params[$i];
}
$command = $params[0];
// Execute command
if ($command == "/start") {
start($chatID);
}
if ($command == "/help") {
help($chatID);
}
if ($command == "/tex") {
tex($chatID, $parameters);
}
}
示例7: __construct
public function __construct()
{
$args = Console_Getopt::readPHPArgv();
if (PEAR::isError($args)) {
fwrite(STDERR, $args->getMessage() . "\n");
exit(1);
}
// Compatibility between "php script.php" and "./script.php"
if (realpath($_SERVER['argv'][0]) == __FILE__) {
$this->options = Console_Getopt::getOpt($args, $this->short_format_config);
} else {
$this->options = Console_Getopt::getOpt2($args, $this->short_format_config);
}
// Check for invalid options
if (PEAR::isError($this->options)) {
fwrite(STDERR, $this->options->getMessage() . "\n");
$this->help();
}
$this->command = array();
// Loop through the user provided options
foreach ($this->options[0] as $option) {
switch ($option[0]) {
case 'h':
help();
break;
case 's':
$this->command['syntax'] = $option[1];
break;
case 't':
$this->command['transform'] = $option[1];
break;
case 'c':
$this->command['config'] = $option[1];
break;
}
}
// Loop through the user provided options
foreach ($this->options[1] as $argument) {
$this->command['query'] .= ' ' . $argument;
}
}
示例8: render
public function render()
{
if (server_or_default('REQUEST_METHOD') == 'POST') {
error400('This service has been deprecated, no new pastes are being accepted.');
return;
} else {
// Trying to access one?
if (count($this->route_matches) > 1) {
// Yes
$this->paste_id = $this->route_matches[1];
$this->fetch_paste();
if ($this->paste_text) {
// NEVER EVER EVER EVER EVER EVER EVER remove this header() without
// changing the lines below it. XSS is bad. :)
header('Content-type: text/plain; charset=utf-8');
header('X-Content-Type-Options: nosniff');
$this->wrap_pre = false;
$this->escape = false;
$this->text_html_strip = false;
$this->text_content_type = false;
return $this->paste_text;
} else {
error404();
return;
}
} else {
if (!is_html_useragent()) {
// No use in showing a form for text UAs. Rather, show help text.
return help('DaGdPastebinController');
}
$content = '
***da.gd Pastebin***
This feature is being deprecated and no new pastes are being accepted.
';
$markup = new DaGdMarkup($content);
$markup = $markup->render();
echo $markup;
return;
}
}
}
示例9: userinput
function userinput()
{
global $handle, $user;
$option = 1;
echo "Succesfully logged in.\n";
echo "Enter h for help.\n";
while ($option != "q\n") {
echo "Enter an option: ";
$option = fgets($handle);
if ($option == "a\n") {
newsite();
}
if ($option == "h\n") {
help();
}
if ($option == "l\n") {
listsite();
}
if ($option == "o\n") {
openurl();
}
if ($option == "d\n") {
deleteurl();
}
if ($option == "r\n") {
replaceurl();
}
if ($option == "s\n") {
search();
}
if ($option == "e\n") {
export();
}
if ($option == "i\n") {
import();
}
}
}
示例10: help
?>
</tbody>
</table>
</div>
<div class="btn_list01 btn_list">
<input type="button" value="선택삭제" id="sel_option_delete">
</div>
<fieldset <?php
echo $super_view;
?>
>
<legend>옵션 일괄 적용</legend>
<?php
echo help('전체 옵션의 추가금액, 재고/통보수량 및 사용여부를 일괄 적용할 수 있습니다. 단, 체크된 수정항목만 일괄 적용됩니다.');
?>
<label for="opt_com_price">추가금액</label>
<label for="opt_com_price_chk" class="sound_only">추가금액일괄수정</label><input type="checkbox" name="opt_com_price_chk" checked="checked" value="1" id="opt_com_price_chk" class="opt_com_chk">
<input type="text" name="opt_com_price" value="0" id="opt_com_price" class="frm_input" size="5">
<label for="opt_com_stock">재고수량</label>
<label for="opt_com_stock_chk" class="sound_only">재고수량일괄수정</label><input type="checkbox" name="opt_com_stock_chk" checked="checked" value="1" id="opt_com_stock_chk" class="opt_com_chk">
<input type="text" name="opt_com_stock" value="0" id="opt_com_stock" class="frm_input" size="5">
<label for="opt_com_noti">통보수량</label>
<label for="opt_com_noti_chk" class="sound_only">통보수량일괄수정</label><input type="checkbox" name="opt_com_noti_chk" checked="checked" value="1" id="opt_com_noti_chk" class="opt_com_chk">
<input type="text" name="opt_com_noti" value="0" id="opt_com_noti" class="frm_input" size="5">
<label for="opt_com_use">사용여부</label>
<label for="opt_com_use_chk" class="sound_only">사용여부일괄수정</label><input type="checkbox" name="opt_com_use_chk" value="1" checked="checked" id="opt_com_use_chk" class="opt_com_chk">
<select name="opt_com_use" id="opt_com_use">
<option value="1">사용함</option>
<option value="0">사용안함</option>
示例11: explode
$PHPCOVERAGE_HOME = $argv[++$i];
break;
case "-b":
$LOCAL_PHPCOVERAGE_LOCATION = $argv[++$i];
break;
case "-u":
$UNDO = true;
break;
case "-e":
$EXCLUDE_FILES = explode(",", $argv[++$i]);
break;
case "-v":
$VERBOSE = true;
break;
case "-h":
help();
break;
default:
$paths[] = $argv[$i];
break;
}
}
if (!is_dir($LOCAL_PHPCOVERAGE_LOCATION)) {
error("LOCAL_PHPCOVERAGE_LOCATION [{$LOCAL_PHPCOVERAGE_LOCATION}] not found.");
}
if (empty($PHPCOVERAGE_HOME) || !is_dir($PHPCOVERAGE_HOME)) {
$PHPCOVERAGE_HOME = __PHPCOVERAGE_HOME;
if (empty($PHPCOVERAGE_HOME) || !is_dir($PHPCOVERAGE_HOME)) {
error("PHPCOVERAGE_HOME does not exist. [" . $PHPCOVERAGE_HOME . "]");
}
}
示例12: isset
$maintOpt = isset($row[5]) ? $row[5] == 'Y' ? 5 : 0 : 0;
$groomOpt = isset($row[6]) ? $row[6] == 'Y' ? 6 : 0 : 0;
$boardOpt = isset($row[7]) ? $row[7] == 'Y' ? 7 : 0 : 0;
$companyOpt = isset($row[10]) ? $row[10] == 'Y' ? 10 : 0 : 0;
$docmgmtOpt = isset($row[34]) ? $row[35] == 'Y' ? 14 : 0 : 0;
$adminOpt = isset($row[35]) ? $row[35] == 'Y' ? 12 : 0 : 0;
$menuOpt = 'mo';
$logoffOpt = 11;
echo '<div class="center">Petclinic Management</div>';
echo '<form method="post">';
echo '<div class="center">';
echo '<div class="mainItem"><div title="Appointments" id="appointmentImg" class="mainImg" data-menu="' . $apptOpt . '" onclick="sendmmnav(this); return false;"></div><div>Appointments</div></div>';
echo '<div class="mainItem"><div title="Phone Messages" id="phonemsgImg" class="mainImg" data-menu="' . $phoneOpt . '" onclick="sendmmnav(this);"></div><div>Phone Messages</div></div>';
echo '<div class="mainItem"><div title="Search" id="searchImg" class="mainImg" data-menu="' . $searchOpt . '" onclick="sendmmnav(this); return false;"></div><div>Search</div></div>';
echo '<div class="mainItem"><div title="Clients" id="clientsImg" class="mainImg" data-menu="' . $clientOpt . '" onclick="sendmmnav(this); return false;"></div><div>Clients</div></div>';
echo '<div class="mainItem"><div title="Listings" id="listingsImg" class="mainImg" data-menu="' . $listOpt . '" onclick="sendmmnav(this); return false;"></div><div>Listings</div></div>';
echo '<div class="mainItem"><div title="Maintenance" id="maintImg" class="mainImg" data-menu="' . $maintOpt . '" onclick="sendmmnav(this); return false;"></div><div>Maintenance</div></div>';
echo '<div class="mainItem"><div title="Grooming" id="groomingImg" class="mainImg" data-menu="' . $groomOpt . '" onclick="sendmmnav(this); return false;"></div><div>Grooming</div></div>';
echo '<div class="mainItem"><div title="Boarding" id="boardingImg" class="mainImg" data-menu="' . $boardOpt . '" onclick="sendmmnav(this); return false;"></div><div>Boarding</div></div>';
echo '<div class="mainItem"><div title="Company" id="companyImg" class="mainImg" data-menu="' . $companyOpt . '" onclick="sendmmnav(this); return false;"></div><div>Company</div></div>';
echo '<div class="mainItem"><div title="Document Mgmt" id="docmgmtImg" class="mainImg" data-menu="' . $docmgmtOpt . '" onclick="sendmmnav(this); return false;"></div><div>Document Mgmt</div></div>';
echo '<div class="mainItem"><div title="System Admin" id="systemadminImg" class="mainImg" data-menu="' . $adminOpt . '" onclick="sendmmnav(this); return false;"></div><div>System Admin</div></div>';
echo '<div class="mainItem"><div title="Main Menu" id="menuImg" class="mainImg" data-menu="' . $menuOpt . '" onclick="sendmmnav(this); return false;"></div><div>Main Menu</div></div>';
echo '<div class="mainItem"><div title="Logoff" id="logoffImg" class="mainImg" data-menu="' . $logoffOpt . '" onclick="sendmmnav(this);"></div><div>Logoff</div></div>';
echo '</div></form>';
echo '<div><font size="+2" color="red">';
include "includes/display_errormsg.inc";
echo '</font></div>';
require_once "includes/helpline.inc";
help("mainicon.php");
require_once "includes/footer.inc";
示例13: get_selected
<option value="pc"<?php
echo get_selected($nw['nw_device'], 'pc');
?>
>PC</option>
<option value="mobile"<?php
echo get_selected($nw['nw_device'], 'mobile');
?>
>모바일</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="nw_disable_hours">시간<strong class="sound_only"> 필수</strong></label></th>
<td>
<?php
echo help("고객이 다시 보지 않음을 선택할 시 몇 시간동안 팝업레이어를 보여주지 않을지 설정합니다.");
?>
<input type="text" name="nw_disable_hours" value="<?php
echo $nw['nw_disable_hours'];
?>
" id="nw_disable_hours" required class="frm_input required" size="5"> 시간
</td>
</tr>
<tr>
<th scope="row"><label for="nw_begin_time">시작일시<strong class="sound_only"> 필수</strong></label></th>
<td>
<input type="text" name="nw_begin_time" value="<?php
echo $nw['nw_begin_time'];
?>
" id="nw_begin_time" required class="frm_input required" size="21" maxlength="19">
<input type="checkbox" name="nw_begin_chk" value="<?php
示例14: help
<th scope="row"><label for="cf_point">문자전송 차감 포인트<strong class="sound_only"> 필수</strong></label></th>
<td>
<?php
echo help("회원이 문자를 전송할시에 차감할 포인트를 입력해주세요. 0이면 포인트를 차감하지 않습니다.");
?>
<input type="text" name="cf_point" value="<?php
echo $sms5['cf_point'];
?>
" id="cf_point" required class="frm_input required" size="5">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_day_count">문자전송 하루제한 갯수<strong class="sound_only"> 필수</strong></label></th>
<td>
<?php
echo help("회원이 하루에 보낼수 있는 문자 갯수를 입력해주세요. 0이면 제한하지 않습니다.");
?>
<input type="text" name="cf_day_count" value="<?php
echo $sms5['cf_day_count'];
?>
" id="cf_day_count" required class="frm_input required" size="5">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
<td>
<?php
echo get_sms5_skin_select('skin', 'cf_skin', 'cf_skin', $sms5['cf_skin'], 'required');
?>
</td>
</tr>
示例15: apms_color_options
<tbody>
<tr>
<td align="center">탭라인</td>
<td>
<select name="wset[tab]">
<?php
echo apms_color_options($wset['btn1']);
?>
</select>
</td>
</tr>
<tr>
<td align="center">썸네일</td>
<td>
<?php
echo help('기본 400x540 - 미입력시 기본값 적용');
?>
<input type="text" name="wset[thumb_w]" value="<?php
echo $wset['thumb_w'];
?>
" class="frm_input" size="4">
x
<input type="text" name="wset[thumb_h]" value="<?php
echo $wset['thumb_h'];
?>
" class="frm_input" size="4">
px
<select name="wset[shadow]">
<?php
echo apms_shadow_options($wset['shadow']);