本文整理汇总了PHP中get_index_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_index_url函数的具体用法?PHP get_index_url怎么用?PHP get_index_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_index_url函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: seo_rank_result
public function seo_rank_result()
{
$url_search = trim($this->input->post('url_search'));
$main_url = get_main_domain($url_search);
$a_rank = get_alexa_ranking($url_search);
$index_url = get_index_url($url_search);
$index_pr = get_pr($index_url);
$page_pr = get_pr($url_search);
$reach_rate = get_change_percent($url_search);
$data = array('rank' => $a_rank, 'index_pr' => $index_pr, 'page_pr' => $page_pr, 'index_url' => $main_url, 'page_url' => $url_search, 'rank_url' => $main_url, 'reach_rate' => $reach_rate);
$this->load->view("seo/seo_rank_search_result", $data);
}
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:12,代码来源:seo_rank.php
示例2: get_list_field
function get_list_field($data, $grid)
{
// 获取当前字段数据
foreach ($grid['field'] as $field) {
$array = explode('|', $field);
$temp = $data[$array[0]];
// 函数支持
if (isset($array[1])) {
$temp = call_user_func($array[1], $temp);
}
$data2[$array[0]] = $temp;
}
if (!empty($grid['format'])) {
$value = preg_replace_callback('/\\[([a-z_]+)\\]/', function ($match) use($data2) {
return $data2[$match[1]];
}, $grid['format']);
} else {
$value = implode(' ', $data2);
}
// 链接支持
if (!empty($grid['href'])) {
$links = explode(',', $grid['href']);
foreach ($links as $link) {
$array = explode('|', $link);
$href = $array[0];
if (preg_match('/^\\[([a-z_]+)\\]$/', $href, $matches)) {
$val[] = $data2[$matches[1]];
} else {
$show = isset($array[1]) ? $array[1] : $value;
// 替换系统特殊字符串
$href = str_replace(array('[DELETE]', '[EDIT]', '[SEE]', '[LIST]'), array('del?ids=[id]&model=[model_id]', 'edit?id=[id]&model=[model_id]&cate_id=[category_id]', get_index_url() . '/index.php?s=/home/article/detail/id/[id].html', 'index?pid=[id]&model=[model_id]&cate_id=[category_id]'), $href);
// 替换数据变量
$href = preg_replace_callback('/\\[([a-z_]+)\\]/', function ($match) use($data) {
return $data[$match[1]];
}, $href);
$val[] = '<a href="' . get_nav_url($href) . '" target="' . get_target_attr($href) . '">' . $show . '</a>';
}
}
$value = implode(' ', $val);
}
return $value;
}
开发者ID:gitchenze,项目名称:soloshop,代码行数:42,代码来源:function.php
示例3: get_nav_url
?>
"><a href="<?php
echo get_nav_url($menu["url"]);
?>
"><?php
echo $menu["title"];
?>
</a></li><?php
}
}
} else {
echo "";
}
?>
<li><a href="<?php
echo get_index_url();
?>
" target="_blank">网站首页</a></li>
</ul>
<!-- /主导航 -->
<!-- 用户栏 -->
<div class="user-bar">
<a href="javascript:;" class="user-entrance"><i class="icon-user"></i></a>
<ul class="nav-list user-menu hidden">
<li class="manager">你好,<em title="<?php
echo session('user_auth.username');
?>
"><?php
echo session('user_auth.username');
?>
开发者ID:a1357479,项目名称:techan,代码行数:31,代码来源:65a5c81e2e43da849a7b345f7d20293b.php
示例4: get_confing
//网站配置文件
$_confing = get_confing($lang);
$is_template = isset($_confing['web_template']) ? $_confing['web_template'] : '';
if ($is_template) {
if (!file_exists(CMS_PATH . 'template/' . $_confing['web_template'])) {
$err_msg = str_replace('@', $lang_name, $language['msg_info2']);
die($err_msg);
}
} else {
$err_msg = str_replace('@', $lang_name, $language['msg_info3']);
die($err_msg);
}
$index_focus = "focus";
//指向首页
if ($_confing['web_html'] && !$is_html) {
$html_url = get_index_url($lang) ? 'index.html' : 'index_' . $lang . '.html';
if (file_exists($html_url)) {
include $html_url;
//header("location:index_{$lang}.html");
} else {
$err_msg = str_replace('@', $lang_name, $language['msg_info4']);
die($err_msg);
}
} else {
$tpl->template_dir = TP_PATH . $_confing['web_template'] . '/';
$tpl->template_lang = $lang;
if ($_confing['is_cache']) {
$tpl->template_is_cache = 1;
//缓存
$tpl->template_time = $_confing['cache_time'] ? $_confing['cache_time'] : 30;
//开启缓存但不存在缓存时间使用30秒
开发者ID:BGCX261,项目名称:zhuoao-svn-to-git,代码行数:31,代码来源:index.php
示例5: elseif
}
//模型缓存
if (file_exists(DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php')) {
include DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php';
}
//当前语言下的栏目
@set_time_limit(0);
if ($action == 'htm') {
include 'template/admin_htm_index.html';
} elseif ($action == 'index') {
//生成首页
//global $lang,$_confing,$_index,$language,$tpl;
if (!$_confing['web_html'][0]) {
err('<span style="color:red">请先开启【' . $lang . '】语言的html生成</span>');
}
$index_url = get_index_url($lang);
//设定访问的语言
ob_start();
$index_focus = "focus";
$index_fl = $index_url ? CMS_PATH . 'index.html' : CMS_PATH . 'index_' . $lang . '.html';
$tpl->display('index');
creat_html($index_fl);
$index_fl = $index_url ? CMS_SELF . 'index.html' : CMS_SELF . 'index_' . $lang . '.html';
err('首页生成完成【<a target="_blank" href="' . $index_fl . '">浏览' . $lang . '语言首页</a>】');
//栏目生成界面
} elseif ($action == 'cate') {
global $lang;
if (file_exists(DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php')) {
include DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php';
}
include 'template/admin_htm_cate.html';
开发者ID:BGCX261,项目名称:zhuoao-svn-to-git,代码行数:31,代码来源:admin_htm.php
示例6: url
function url($con = 'index', $m = 'index', $paramer = array(), $index = "")
{
if ($index != '1') {
if ($con == 'index' && $m == 'index') {
$url .= 'index.php';
} elseif ($con == 'index') {
$url .= 'index.php?m=' . $m;
} elseif ($m == 'index') {
$url .= 'index.php?con=' . $con;
} else {
$url .= 'index.php?con=' . $con . '&m=' . $m;
}
if ($paramer) {
$p = '';
foreach ($paramer as $k => $v) {
if (!empty($v)) {
$p .= '&' . $k . '=' . $v;
}
}
if (strpos($url, '?')) {
$url .= $p;
} else {
$url .= '?' . substr($p, 1);
}
}
return $url;
} else {
global $seo;
$paramer['con'] = $con;
$paramer['m'] = $m;
$url = get_index_url($paramer, $this->config, $seo, "", $index);
return $url;
}
}
开发者ID:keyu199314,项目名称:php,代码行数:34,代码来源:common.php
示例7: nav_bottom
function nav_bottom()
{
global $lang, $cat_id, $language, $cate_list;
$_confing = get_confing($GLOBALS['lang']);
if (file_exists(DATA_PATH . $lang . '_info.php')) {
include DATA_PATH . $lang . '_info.php';
}
if (file_exists(DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php')) {
include DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php';
}
//当前语言下的栏目
$rel = array();
$is_main_lang = get_index_url($lang);
//是否是进站语言
$path = CMS_SELF;
if (!empty($cate_list)) {
foreach ($cate_list as $k => $v) {
$cate_nav = empty($v['cate_nav']) ? array('') : explode(',', $v['cate_nav']);
if (in_array('3', $cate_nav)) {
if ($v['cate_hide']) {
unset($cate_list[$k]);
continue;
}
$channel_info = get_cate_info($v['cate_channel'], $GLOBALS['channel']);
//获得内容模型信息
$list_php = empty($channel_info['list_php']) ? 'show_list.php' : $channel_info['list_php'];
$rel[$k] = $cate_list[$k];
$rel[$k]['cate_pic1'] = CMS_SELF . 'upload/' . $v['cate_pic1'];
$rel[$k]['cate_pic2'] = CMS_SELF . 'upload/' . $v['cate_pic2'];
$rel[$k]['cate_pic3'] = CMS_SELF . 'upload/' . $v['cate_pic3'];
$rel[$k]['target'] = intval($v['cate_is_open']) ? 'target="_blank"' : '';
//新窗口
if ($v['cate_tpl'] == 2) {
$url = $v['cate_url'];
} else {
$url = $v['cate_html'] && $_confing['web_html'][0] ? $path . 'htm/' . $v['cate_fold_name'] : $path . $list_php . '?id=' . $v['id'];
if ($v['cate_tpl'] == 3) {
$url = $v['cate_html'] && $_confing['web_html'][0] ? $path . 'htm/' . $v['cate_fold_name'] . '/' : $path . $list_php . '?id=' . $v['id'];
}
//表单
if ($v['cate_channel'] == '-9') {
$url = $v['cate_html'] && $_confing['web_html'][0] ? $path . 'htm/' . $v['cate_fold_name'] : $path . 'order/order.php?id=' . $v['id'];
}
}
$rel[$k]['url'] = $url;
} else {
unset($cate_list[$k]);
}
}
}
if ($is_main_lang) {
$map_arr['url'] = $_confing['web_html'][0] ? $path . 'htm/' . $lang . '_sitemap.html' : $path . 'sitemap/sitemap.php';
} else {
$map_arr['url'] = $_confing['web_html'][0] ? $path . 'htm/' . $lang . '_sitemap.html' : $path . 'sitemap/sitemap.php?lang=' . $lang;
}
$map_arr['cate_name'] = $language['sitemap'];
$rel[] = $map_arr;
//存在留言本放在后面
$sql = "select book_pos from " . DB_PRE . "book_info where id=1";
$pos = $GLOBALS['mysql']->get_row($sql);
$pos_arr = empty($pos) ? array() : explode(',', $pos);
$is_book = is_array($pos_arr) ? in_array('2', $pos_arr) : '';
if ($is_book) {
$book['cate_name'] = $GLOBALS['language']['book'];
if ($is_main_lang) {
$book['url'] = CMS_SELF . 'book/book.php';
} else {
$book['url'] = CMS_SELF . 'book/book.php?lang=' . $lang;
}
$rel[] = $book;
}
if (!empty($rel)) {
$i = 1;
$num = count($rel);
foreach ($rel as $k => $v) {
$rel[$k]['autoindex'] = $i;
$rel[$k]['first'] = $i == 1 ? 1 : 0;
$rel[$k]['last'] = $num == $i ? 1 : 0;
$i = $i + 1;
}
}
return $rel;
}
开发者ID:BGCX261,项目名称:zhuoao-svn-to-git,代码行数:83,代码来源:lib.php
示例8: Url
function Url($con = 'index', $m = 'index', $paramer = array(), $index = "")
{
global $db, $db_config, $config, $seo;
$paramer['con'] = $con;
$paramer['m'] = $m;
$url = get_index_url($paramer, $config, $seo, "", $index);
return $url;
}
开发者ID:keyu199314,项目名称:php,代码行数:8,代码来源:Smarty_Compiler.class.php
注:本文中的get_index_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论