本文整理汇总了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']);
}
开发者ID:omusico,项目名称:suitecrm-docker,代码行数:12,代码来源:AOR_Report.php
示例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;
}
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:21,代码来源:templateFields.php
示例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;
}
开发者ID:razorinc,项目名称:sugarcrm-example,代码行数:24,代码来源:utils.php
注:本文中的str_begin函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论