本文整理汇总了PHP中str_begin函数的典型用法代码示例。如果您正苦于以下问题:PHP str_begin函数的具体用法?PHP str_begin怎么用?PHP str_begin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了str_begin函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load_report_beans
function load_report_beans()
{
global $beanList, $app_list_strings;
$app_list_strings['aor_moduleList'] = $app_list_strings['moduleList'];
foreach ($app_list_strings['aor_moduleList'] as $mkey => $mvalue) {
if (!isset($beanList[$mkey]) || str_begin($mkey, 'AOR_') || str_begin($mkey, 'AOW_')) {
unset($app_list_strings['aor_moduleList'][$mkey]);
}
}
$app_list_strings['aor_moduleList'] = array_merge((array) array('' => ''), (array) $app_list_strings['aor_moduleList']);
asort($app_list_strings['aor_moduleList']);
}
示例2: genDropDownJS2
function genDropDownJS2()
{
global $app_list_strings, $beanList, $beanFiles;
$lblContactAndOthers = implode('/', array(isset($app_list_strings['moduleListSingular']['Contacts']) ? $app_list_strings['moduleListSingular']['Contacts'] : 'Contact', isset($app_list_strings['moduleListSingular']['Leads']) ? $app_list_strings['moduleListSingular']['Leads'] : 'Lead', isset($app_list_strings['moduleListSingular']['Prospects']) ? $app_list_strings['moduleListSingular']['Prospects'] : 'Target'));
$dropdown = '';
array_multisort($app_list_strings['moduleList'], SORT_ASC, $app_list_strings['moduleList']);
foreach ($app_list_strings['moduleList'] as $key => $name) {
if (isset($beanList[$key]) && isset($beanFiles[$beanList[$key]]) && !str_begin($key, 'AOW_') && !str_begin($key, 'zr2_')) {
if ($key == 'Contacts') {
$dropdown .= "<option value='" . $key . "'>\n\t\t\t\t\t\t" . $lblContactAndOthers . "\n\t\t \t </option>";
} else {
if (isset($app_list_strings['moduleListSingular'][$key])) {
$dropdown .= "<option value='" . $key . "'>\n\t\t\t\t\t\t" . $app_list_strings['moduleListSingular'][$key] . "\n\t\t \t </option>";
} else {
$dropdown .= "<option value='" . $key . "'>\n\t\t\t\t\t\t" . $app_list_strings['moduleList'][$key] . "\n\t\t \t </option>";
}
}
}
}
return $dropdown;
}
示例3: appendPortToHost
/**
* This function will take a number and system_id and format
* @param $url URL containing host to append port
* @param $port the port number - if '' is passed, no change to url
* @return $resulturl the new URL with the port appended to the host
*/
function appendPortToHost($url, $port)
{
$resulturl = $url;
// if no port, don't change the url
if ($port != '') {
$split = explode("/", $url);
//check if it starts with http, in case they didn't include that in url
if (str_begin($url, 'http')) {
//third index ($split[2]) will be the host
$split[2] .= ":" . $port;
} else {
//first index ($split[0]) will be the host
$split[0] .= ":" . $port;
}
$resulturl = implode("/", $split);
}
return $resulturl;
}