本文整理汇总了PHP中site_path函数的典型用法代码示例。如果您正苦于以下问题:PHP site_path函数的具体用法?PHP site_path怎么用?PHP site_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了site_path函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: is_index
function is_index()
{
$req = $_SERVER['REQUEST_URI'];
if ($req == site_path() . '/') {
return true;
} else {
return false;
}
}
示例2: clear_page_cache
function clear_page_cache($url)
{
$b = str_replace('/', '#', site_path() . '/');
$p = 'cache/page/' . $b . $url . '.cache';
if (file_exists($p)) {
unlink($p);
}
}
示例3: site_path
?>
</td>
</tr>
<tr>
<td align="center" valign="middle" class="input"> </td>
</tr>
<tr>
<td align="left" valign="middle" class="line24"><?php
echo $page->getContent();
?>
</td>
</tr>
</table></td>
</tr>
</table>
<table width="96%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" bgcolor="#FFFFFF"> </td>
</tr>
</table></td>
</tr>
</table>
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"><img src="<?php
echo site_path("images/spacer.gif");
?>
" width="1" height="1"></td>
</tr>
</table>
示例4: dispatch
function dispatch()
{
$path = $_SERVER['REQUEST_URI'];
if (config('site.url') !== null) {
$path = preg_replace('@^' . preg_quote(site_path()) . '@', '', $path);
}
$parts = preg_split('/\\?/', $path, -1, PREG_SPLIT_NO_EMPTY);
$uri = trim($parts[0], '/');
$uri = strlen($uri) ? $uri : 'index';
route(method(), "/{$uri}");
}
示例5: site_path
margin-right: 0px;
margin-bottom: 0px;
}
/*链接样式*/
a{text-decoration: none;} /* 链接无下划线,有为underline */
a:link {color: #454545;} /* 未访问的链接 */
a:visited {color: #454545;} /* 已访问的链接 */
a:hover{color: #ff0000;} /* 鼠标在链接上 */
a:active {color: #454545;} /* 点击激活链接 */
menu {padding:0px 0px; margin:0px 0px;}
menu h3 { margin:0px 0px;font-size:12px;background:url(<?php
echo site_path("images/admin/main_34_1.gif");
?>
) no-repeat; padding:5px 16px;}
menu li { margin:0px 0px;padding:2px 16px; list-style:none; background:url(<?php
echo site_path("images/admin/menu_ico.gif");
?>
) no-repeat; background-position:0px 6px;}
menu ul { margin:0px 0px;padding:0px 0px;}
body,td,th {
font-size: 12px;
}
.mouseover { border:solid 1px #adb9c2; background:url(<?php
echo site_url("images/admin/tab_bg.gif");
?>
) repeat-x;}
-->
</style>
</HEAD>
<BODY>
<?php
示例6: site_path
<script language="javascript" type="text/javascript" src="<?php
echo site_path("js/jquery.progress.js");
?>
"></script>
<script language="javascript" type="text/javascript">
$(function(){
get();
});
function get()
{
$.get('<?php
echo site_url("admin/build/article");
?>
',{},function(json){
eval("json = " + json);
$("#progressbar").Progress(json.num,json.total);
if(json.num < json.total) get();
});
}
</script>
<STYLE>
#progressbar {
BORDER-RIGHT: #add2da 1px solid; BORDER-TOP: #add2da 1px solid; BORDER-LEFT: #add2da 1px solid; WIDTH: 99%; COLOR: #add2da; BORDER-BOTTOM: #add2da 1px solid; POSITION: relative; HEIGHT: 20px; padding:1px 1px;
}
#progressbar DIV.progress {
OVERFLOW: hidden; WIDTH: 0px; POSITION: absolute; HEIGHT: 20px; BACKGROUND-COLOR: #add2da;
}
#progressbar DIV.progress .text {
COLOR: white; POSITION: absolute; TEXT-ALIGN: center
}
示例7: site_path
?>
',addPic);" />
</label>
(如果想删除上传的图片,请不要勾选该图片,保存即可。)</td>
</tr>
<tr>
<td colspan="3"><ul class="img_list">
<?php
$images = $product->getImages();
for ($i = 0, $n = count($images); $i < $n; $i++) {
if ($images[$i] == '') {
continue;
}
?>
<li><img src="<?php
echo site_path("up_files/" . $images[$i]);
?>
" width="150" height="100" alt="" /><input name="images[]" type="checkbox" checked="checked" value="<?php
echo $images[$i];
?>
" /></li>
<?php
}
?>
</ul></td>
</tr>
<tr>
<th align="center">详细描述</th>
<td colspan="3" align="center"><?php
echo sf::getPlugin("Fckeditor", "content", $product->getContent(), '100%', 600)->create();
?>
示例8: site_path
?>
" type="text/javascript"></script>
<script language="javascript" src="<?php
echo site_path("js/jquery.form.js");
?>
" type="text/javascript"></script>
<script language="javascript" src="<?php
echo site_path("js/validate/jquery.validate.js");
?>
" type="text/javascript"></script>
<script language="javascript" src="<?php
echo site_path("js/jquery.datePicker.js");
?>
" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="<?php
echo site_path("js/loadbox.js");
?>
"></script>
<script language="javascript" type="text/jscript">
$(document).ready(function() {
$("#validateForm").validate({errorElement: "em"});
$('.menubar li[class!="active"]').mouseover(function(){$(this).addClass("active");});
$('.menubar li[class!="active"]').mouseout(function(){$(this).removeClass("active");});
});
</script>
</head>
<body>
<div class="header">
<div class="logo">快速建站</div>
<div class="banner">baner</div>
</div>
示例9: site_url
<td height="121" colspan="2" valign="top"><strong>简要说明:</strong>
<?php
echo $product->getBrief();
?>
</td>
</tr>
<tr>
<form action="" method="post" name="form1" id="form1">
<td colspan="2" class="line18"><table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="48%"> </td>
<td width="52%"><a href="<?php
echo site_url("order_from/index/type/" . $type . "/subject/" . $product->getSubject());
?>
"><img src="<?php
echo site_path("images/gmbtn.png");
?>
" width="71" height="25" border="0" /></a></td>
</tr>
</table></td>
</form>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"> </td>
</tr>
</table>
<table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" style="line-height:25px;">
示例10: site_url
echo site_url("common/index");
?>
" align="absmiddle"></td>
</tr>
<tr>
<td height="35"> </td>
<td width="20%" height="35"><input name="Submit" class="button" id="Submit" value="登 陆" type="submit"> </td>
<td class="top_hui_text" width="67%"><input name="cs" class="button" id="cs" value="取 消" type="reset"></td>
</tr>
</tbody></table>
<br>
</form></td>
</tr>
<tr>
<td align="right" valign="bottom" width="433" height="164"><img src="<?php
echo site_path("images/admin/login-wel.gif");
?>
" width="242" height="138"></td>
<td align="right" valign="bottom" width="57"> </td>
</tr>
</tbody></table></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table></td>
</tr>
<tr>
<td height="20"><table class="login-buttom-bg" border="0" width="100%" cellpadding="0" cellspacing="0">
<tbody><tr>
<td align="center"><span class="login-buttom-txt">Copyright © 2009</span></td>
示例11: getMagicHtmlStr
/**
* 幻灯型
*/
function getMagicHtmlStr()
{
$pic = $link = $text = $content = array();
$content = $this->ads->getContent();
for ($i = 0, $n = count($content); $i < $n; $i++) {
if (!$content[$i]["image"]) {
continue;
}
$pic[] = site_path("up_files/" . $content[$i]["image"]);
$link[] = $content[$i]["url"];
$text[] = $content[$i]["des"];
}
$str = 'pics=' . implode("|", $pic) . '&links=' . implode("|", $link) . '&texts=' . implode("|", $text) . '&&borderwidth=' . $content["config"]["width"] . '&borderheight=' . $content["config"]["height"] . '&textheight=' . $content["config"]["textheight"];
$htmlStr = '<div class="ad_magic">';
$htmlStr .= '<embed src="' . site_path("images/tools/pix.swf") . '" wmode="opaque" FlashVars="' . $str . '" menu="false" bgcolor="' . $content["config"]["bgcolor"] . '" quality="high" width="' . $content["config"]["width"] . '" height="' . $content["config"]["height"] . '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
$htmlStr .= '</div>';
return $htmlStr;
}
示例12: site_path
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="<?php
echo site_path("images/admin/main_71.gif");
?>
" style="line-height:11px; table-layout:fixed" width="165"> </td>
<td background="<?php
echo site_path("images/admin/main_72.gif");
?>
" style="line-height:11px; table-layout:fixed"> </td>
<td background="<?php
echo site_path("images/admin/main_74.gif");
?>
" style="line-height:11px; table-layout:fixed" width="17"> </td>
</tr>
</table>
</body>
</html>
示例13: selectProductWithImgAndSubjectByCategoryId
/**
* 取得置顶产品
*/
function selectProductWithImgAndSubjectByCategoryId($categoryId = '0', $showMax = 5, $subjectLen = 10)
{
$addWhere = $addSql = '';
$type && ($addWhere .= "`type_str` = '" . $type . "' ");
$categoryId && ($addWhere .= "`category_id` = '" . $categoryId . "' ");
$addSql = "ORDER BY updated_at DESC";
$result = sf::getModel("products")->selectAll($addWhere, $addSql, $showMax);
$htmlStr .= '<ul class="selectProductWithImgAndSubjectByCategoryId">' . "\r\n";
while ($product = $result->getObject()) {
$htmlStr .= ' <li><img src="' . site_path("up_files/" . $product->getCover()) . '" onerror="this.src=\'' . site_path("images/cp01.jpg") . '\'" /><h1>' . link_to("product/show/type/" . $product->getTypeStr() . "/id/" . $product->getId(), $product->getSubject($subjectLen), array('target' => '_blank')) . "</h1></li>\r\n";
}
$htmlStr .= "</ul>";
return $htmlStr;
}
示例14: show
function show()
{
!input::getInput("get.id") && $this->page_debug(lang::get("Lack of parameters!"));
header("location:" . site_path("up_files/" . sf::getModel("filemanager", input::getInput("get.id"))->getFilePath()));
}
示例15: site_path
<td><?php
echo $template->getSubject();
?>
</td>
</tr>
<tr>
<th align="right" width="80">模板描述</th>
<td><?php
echo $template->getBrief();
?>
</td>
</tr>
<tr>
<th align="right" width="80">封面图片</th>
<td><img src="<?php
echo site_path("up_files/" . $template->getCover());
?>
" width="120" height="100" /></td>
</tr>
<tr>
<th align="right">发布日期</th>
<td><?php
echo $template->getUpdatedAt("Y/m/d");
?>
</td>
</tr>
<tr>
<th align="center">参数说明</th>
<td align="left"><?php
echo nl2br($template->getNote());
?>