當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Url::staticUrl方法代碼示例

本文整理匯總了PHP中yii\helpers\Url::staticUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Url::staticUrl方法的具體用法?PHP Url::staticUrl怎麽用?PHP Url::staticUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在yii\helpers\Url的用法示例。


在下文中一共展示了Url::staticUrl方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

                                        <div>結束:15.02.21-16:30</div>
                                        <div>地點:海南省海口市秀英區望海樓</div>
                                        </div>
                                    </div>
                                </div>
                                <div class="tag over">
                                    已結束
                                </div>
                            </div>
                        </li>
                        <li class="">
                            <div class="model item">
                               <div class="infowrap">
                                    <div class="avadar rectavadar distable-cell">
                                        <img src="<?php 
echo Url::staticUrl('images/avatar-dhg.png');
?>
">
                                    </div>
                                    <div class="userinfo distable-cell">
                                        <div class="username">
                                            <span class="name pd0">馬克·砸破胳膊</span>
                                            <span class="iconfont lightcolor13">ä</span>

                                        </div>
                                        <div class="userintro lightcolor13">
                                        <div>發起:陳韓樓<span class="iconfont lightbluecolor13 pd-l6 popup" data-toggle="popover" data-content="公司認證" data-original-title="" title="">Ì</span></div>
                                        <div>開始:15.02.20-15:30</div>
                                        <div>結束:15.02.21-16:30</div>
                                        <div>地點:海南省海口市秀英區望海樓</div>
                                        </div>
開發者ID:songhongyu,項目名稱:datecenter,代碼行數:31,代碼來源:view.php

示例2: url

<?php

use yii\helpers\Url;
use yii\helpers\Html;
use ep\assets\UserAsset;
UserAsset::register($this);
?>

    <div class="row model index-cover top-right-none top-left-none">
        <div class="imgwrap bg_img" style="background-image: url(<?php 
echo Url::staticUrl('images/banner2.jpg');
?>
)">
            <!-- 右上角icon -->
            <div class="photoicon">
                <span class="iconfont list_icon popup  opacity-half shadow" data-toggle="popover" data-content="修改頭像">&#214</span>
            </div>
            <!-- 漸變遮罩 -->
            <div class="gradientmask">
            </div>
            <div class="avadarwrap rectavadar rectavadar-5">
                <div class="avadar rectavadar rectavadar-5">
                    <img src="<?php 
echo $users['avatar'];
?>
" alt="">
                    <div class="shadow">
                        <span class="iconfont list_icon popup" data-toggle="popover" data-content="修改頭像">&#214</span>
                    </div>
                </div>
            </div>
開發者ID:songhongyu,項目名稱:datecenter,代碼行數:31,代碼來源:index.php

示例3:

<?php

use yii\helpers\Html;
use yii\helpers\Url;
// extract($this->params['global_menu'], EXTR_PREFIX_ALL, 'GL');
$html['powered'] = Yii::powered();
// $html['sidebar'] = $this->renderFile('@ep/views/elements/sidebar.php');
$this->beginContent('@ep/views/layouts/base.php');
$staticUrl = Url::staticUrl();
$html = <<<EOT
<nav class="navbar navbar-default navbar-fixed-top">
\t<div class="container">
\t    <div class="navbar-header">
\t        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
\t            <span class="sr-only">Toggle navigation</span>
\t            <span class="icon-bar"></span>
\t            <span class="icon-bar"></span>
\t            <span class="icon-bar"></span>
\t        </button>
\t        <a class="navbar-brand" href="#"><img src="{$staticUrl}/images/logo.png" /></a>
\t    </div>
\t    <div id="navbar" class="navbar-collapse collapse">
\t        <form class="mobile_search" role="search">
\t            <div class="et">
\t                <input type="text" class="form-control shadow_none" data-action="grow" placeholder="Search" style="width: 100%;">
\t                <button class="iconfont search_btn" type="submit">&#120</button>
\t            </div>
\t        </form>
\t        <ul class="nav navbar-nav mobile_nav">
\t            <li class="active"><a href="#">首頁</a></li>
\t            <li><a href="#">列表</a></li>
開發者ID:songhongyu,項目名稱:datecenter,代碼行數:31,代碼來源:sns.php


注:本文中的yii\helpers\Url::staticUrl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。