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


PHP f::uri方法代碼示例

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


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

示例1: testURI

 public function testURI()
 {
     $expected = 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIdQTFRF/z08/wQD/2pp/42N/+3t/0lI/9XV/xAP//n5/w0M/2Rj/66u/yUk/0A//+fn/8/P/5aW/1ta//b2/3l4/4SE/21s/729/9LS/8bG/0NC/0xL/+rq/4GB//Dw/39+/zEw/xwb/wcG/1JR/xMS/6io/9jY/zQz/1hX/+Hh/7S0/8zM/wEA////1oK62gAAALtJREFUeNqsk9cSgjAQRUPvICD23t3N/3+fUREZ2ABxPC+ZZM7DzRbGe2Cqgj3pFExdQ8uWCq7hoEDTTVoIQixxDLctJBHWCIOGEPvYYG7XhGzsYYsyykuwkMSpBEYL+HfhYBzf7/tiRQopX2/EbzT/xkcSgfNlkZ7FQQu706d6s4sk5Pb+vMFCEpIBQCZuU4CcFK7fxtIZLKjIVQslaZbX3W70486BiRK1kRswtAPGvn9xBqzeL9v9EGAAi9+gVs3Ccg4AAAAASUVORK5CYII=';
     $this->assertEquals($expected, f::base64(TEST_ROOT_ETC . DS . 'images' . DS . 'favicon.png'));
     $expected = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIdQTFRF/z08/wQD/2pp/42N/+3t/0lI/9XV/xAP//n5/w0M/2Rj/66u/yUk/0A//+fn/8/P/5aW/1ta//b2/3l4/4SE/21s/729/9LS/8bG/0NC/0xL/+rq/4GB//Dw/39+/zEw/xwb/wcG/1JR/xMS/6io/9jY/zQz/1hX/+Hh/7S0/8zM/wEA////1oK62gAAALtJREFUeNqsk9cSgjAQRUPvICD23t3N/3+fUREZ2ABxPC+ZZM7DzRbGe2Cqgj3pFExdQ8uWCq7hoEDTTVoIQixxDLctJBHWCIOGEPvYYG7XhGzsYYsyykuwkMSpBEYL+HfhYBzf7/tiRQopX2/EbzT/xkcSgfNlkZ7FQQu706d6s4sk5Pb+vMFCEpIBQCZuU4CcFK7fxtIZLKjIVQslaZbX3W70486BiRK1kRswtAPGvn9xBqzeL9v9EGAAi9+gVs3Ccg4AAAAASUVORK5CYII=';
     $this->assertEquals($expected, f::uri(TEST_ROOT_ETC . DS . 'images' . DS . 'favicon.png'));
 }
開發者ID:aoimedia,項目名稱:kosmonautensofa,代碼行數:7,代碼來源:FTest.php

示例2:

                <div class="uk-container uk-padding-remove">
                    <button class="gateway uk-button uk-button-primary uk-width-1-1" type="submit">
                        <?php 
            echo $gateway != 'paylater' ? '<span class="uk-vertical-align-middle">' . l::get('pay-now') . '</span>' : '';
            ?>
                        <?php 
            if (!$g['logo']) {
                ?>
                            <?php 
                echo $g['label'];
                ?>
                        <?php 
            } else {
                ?>
                            <img src="<?php 
                echo f::uri($g['logo']);
                ?>
" alt="<?php 
                echo $g['label'];
                ?>
">
                        <?php 
            }
            ?>

                        <?php 
            if (isset($g['sandbox']) and $g['sandbox']) {
                ?>
                            <div class="uk-alert uk-alert-warning">
                                <?php 
                echo l::get('sandbox-message');
開發者ID:samnabi,項目名稱:shopkit,代碼行數:31,代碼來源:cart.php


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