本文整理汇总了PHP中Path::url方法的典型用法代码示例。如果您正苦于以下问题:PHP Path::url方法的具体用法?PHP Path::url怎么用?PHP Path::url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Path
的用法示例。
在下文中一共展示了Path::url方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<ul>
<?php
foreach ($products as $product) {
?>
<li>
<a href="<?php
Path::url('product/' . $product->id);
?>
">
<img src="<?php
echo "images/{$product->images[0]->image}";
?>
" alt="<?php
echo $product->name;
?>
" />
</a>
<h6 class="colr" title="<?php
echo $product->name;
?>
">
<?php
echo strlen($product->name) > 20 ? substr($product->name, 0, 19) . '…' : $product->name;
?>
</h6>
<p class="price bold"><?php
echo number_format($product->price / 1000, 0, '', ',');
?>
k</p>
<a href="cart.html" class="adcart">Add to Cart</a>
</li>
示例2:
?>
<br>
Phone: <?php
echo $account->phone;
?>
<br>
Address: <?php
echo "{$account->address}, {$account->district}, {$account->city}";
?>
<p>
<a style="margin-right: 10px;" href="<?php
Path::url('user/edit');
?>
" class="right bold">Edit Profile</a>
<a style="margin-right: 10px;" href="<?php
Path::url('user/password');
?>
" class="right bold">Chage Password</a>
</p>
</div>
<div class="big_small_sec right news">
<div class="headng">
<h6 class="bold">Account Infomation</h6>
</div>
<p>
Level: <?php
echo $account->id_level;
?>
<br>
Level up date: <?php
echo date_format(date_create($account->level_up_date), 'd-m-Y');
示例3:
<ul class="right">
<li class="text">
Sort by Position
<a href="#" class="colr">Name </a>
<a href="#" class="colr">Price</a>
</li>
<li class="text">Page
<?php
for ($i = 0, $j = -2; $i < 5 && $page + $j < $total_page; $j++) {
if ($page + $j > 0) {
$k = $page + $j;
?>
<a <?php
if ($j != 0) {
echo 'href="';
Path::url("category/{$id_cat}/{$k}");
echo '" class="colr"';
}
?>
><?php
echo $k;
$i++;
?>
</a>
<?php
}
}
?>
</li>
</ul>
<div class="clear"></div>
示例4: foreach
?>
h"><span class="accordprefix"></span>
<?php
echo $department->name;
?>
<span class="accordsuffix"></span></a>
<div class="submenu" contentindex="<?php
echo $i++;
?>
c" style="display: none;">
<ul>
<?php
foreach ($department->categories as $category) {
?>
<li><a href="<?php
echo Path::url('category/' . $category->id);
?>
"><?php
echo $category->name;
?>
</a></li>
<?php
}
?>
</ul>
</div>
<?php
}
}
?>
</div>
示例5:
<ul class="forms">
<li class="txt">Email Address <span class="req">*</span></li>
<li class="inputfield"><input type="text" name="email" class="bar"></li>
</ul>
<ul class="forms">
<li class="txt">Password <span class="req">*</span></li>
<li class="inputfield"><input type="password" name="password" class="bar"></li>
</ul>
<ul class="forms">
<li class="txt"> </li>
<li><input type="submit" class="simplebtn" value="Login"/> <a href="#" class="forgot">Forgot Your Password?</a></li>
</ul>
</form>
</div>
<div class="newcus">
<h3><cufon class="cufon cufon-canvas" alt="Please " style="width: 60px; height: 18px;"><canvas width="70" height="19" style="width: 70px; height: 19px; top: 0px; left: 0px;"></canvas><cufontext>Please </cufontext></cufon><cufon class="cufon cufon-canvas" alt="Sign " style="width: 40px; height: 18px;"><canvas width="50" height="19" style="width: 50px; height: 19px; top: 0px; left: 0px;"></canvas><cufontext>Sign </cufontext></cufon><cufon class="cufon cufon-canvas" alt="In" style="width: 16px; height: 18px;"><canvas width="22" height="19" style="width: 22px; height: 19px; top: 0px; left: 0px;"></canvas><cufontext>In</cufontext></cufon></h3>
<p>
By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more.
</p>
<a href="<?php
Path::url('user/register');
?>
" class="simplebtn"><span style="line-height:2">Register</span></a>
</div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<div class="col3_botm"> </div>
</div>
</div>
示例6: ucwords
<?php
if (null != $request->controller()) {
?>
<li><a href="<?php
echo Path::url($request->controller());
?>
"><?php
echo ucwords($request->controller());
?>
</a></li>
<?php
}
?>
<li><a href="<?php
if (null != $request->action()) {
echo Path::url($request->action());
}
?>
"><?php
echo ucwords($request->action());
?>
</a></li>
</ul>
</div>
<div class="clear"></div>
<?php
//var_dump($request->params());
$file = 'controllers/class-' . $request->controller() . '_controller.php';
if (is_file($file)) {
$method = $request->method() == 'POST' ? '_post' : '';
include_once $file;
示例7:
<h3>Your password has been changed!</h3>
<p style="mid-height:50%">
You should be automatically redirected. If not, follow this <a href="<?php
Path::url('');
?>
" class="colr"><b>link</b></a> to home page...
</p>
<script type="text/javascript">
setTimeout(function(){ window.location.replace("<?php
Path::url('');
?>
")},4000);
</script>
示例8: foreach
<?php
foreach ($product->images as $image) {
?>
<li style="overflow: hidden; float: left; width: 57px; height: 57px;"><a href="#" class="toc selected" rel="1"><img src="<?php
echo "images/{$image->image}";
?>
" alt=""></a></li>
<?php
}
?>
</ul>
</div>
</div>
<a href="javascript:void(null)" class="nextsmall"><img src="images/next.gif" alt=""></a>
<script type="text/javascript" src="<?php
echo Path::url('js/cont_slidr.js');
?>
"></script>
</div>
<div class="desc">
<div class="quickreview">
<a href="#" class="bold black left"><u>Be the first to review this product</u></a>
<div class="clear"></div>
<p class="avail"><span class="bold">Availability:</span> In stock</p>
<h6 class="black">Quick Overview</h6>
<p>
<?php
echo $product->description;
?>
</p>
</div>
示例9: function
$.each(data, function (index,data) {
html += '<option value="'+data.id+'">'+data.name+'</option>';
});
$('#id_district').html(html);
},
dataType: "json"
});
else $('#id_district').html('<option value="">Select district</option>');
});
$( "#email" )
.focusout(function () {
if ($('#email').val().length > 3)
$.ajax({
type:"POST",
url: "<?php
Path::url('json/email');
?>
",
data: {email: $('#email').val()},
success: function (data) {
$('#message').html(data);
},
dataType: "html"
});
});
</script>
</form>
</div>
</div>
<div class="clear"></div>