搜尋
  • 登入
  • 報名
密碼重置成功

關注您感興趣的項目並了解有關它們的最新消息

ThinkPHP6.0 視圖

收藏 501
閱讀 181513
更新時間 2016-09-11


ThinkPHP6 視圖

  • #模板引擎支援普通標籤XML標籤方式兩種標籤定義,分別用於不同的目的

##描述普通標籤主要用於輸出變數、函數過濾和做一些基本的運算操作#XML標籤也稱為標籤庫標籤,主要完成一些邏輯判斷、控制和循環輸出,並且可擴展
標籤類型
 一、運算子 

##運算符##-# {$a-$b}*{$a*$b}/#{$a/$b}%{$a%$b}##{$a } 或{ $a}{$a--} 或{--$a}{$a $b*10 $c}{$a ==$b ? 'yes' : 'no'}
範例
{$a $b}
--
綜合運算
#三元運算子

controller檔案

public function index(){

    View::assign('a',100);

    View::assign(' b',21);

    return View::fetch();

#}

view檔案

##<div> ;{$a $b}</div>

<div>{$a-$b}</div>

<div>{$a*$b }</div>

<div>{$a/$b}</div>

<div>{$a%$b}</div>

<div>{$a }</div>

#<div>{ $a}</div>

<div>{$ a--}</div>

<div>{--$a}</div>

<div>{$c ? '存在' : '不存在'}</div>

 二、模版函數 

方法說明#firstlast
#date日期格式化(支援各種時間類型)
#format字串格式化
#upper轉換為大寫
#lower#轉換成小寫
輸出陣列的第一個元素
輸出陣列的最後一個元素######### ###default######預設值############raw#######不使用(預設)轉義############ md5######md5加密############substr#######截取字串############
  • 可以多函數呼叫

controller檔案

public function index(){

    View: :assign('time',1576048640);

    View::assign('num',10.0032);

    View::assign('str','OUyangKE');

    View::assign('arr',[

        '朱老師',

        '歐陽克',

##o          '歐陽克',

##    大官   '西門大官人   '西門勳爵人

#    ]);

    return View::fetch();

}

view檔案

#< div>{$time|date='Y-m-d H:i:s'}</div>

<div>{$num|format=' d'}</div>

<div>{$str|upper}</div>

#<div>{$str|lower}</div>

#<div> {$arr|first}</div>

<div>{$arr|last}</div>

<div>{$default|default="歐陽克"}</div>

<div>{$str|substr=0,3}</div>

<div>{$str|md5}< ;/div>

<div>{$str|lower|substr=0,3}</div>

三、循環標籤

  • #foreach 標籤的用法和PHP語法非常接近,用於循環輸出陣列或物件的屬性

controller檔案

public function index(){

    $arr = [

        [

            'id' => 1,#            'id' => 1,# #. => '歐陽克'

        ],

        [

            'id' => 2,#            'id' => 2,#  鎠 名詞老師 '

        ],

##        [

            'id' => 3,

## 

##        ]

    ];

    View::assign('arr',$arr);

    return View::fetch();

}

view文件

{foreach $arr as $v}

    <div>

#        < span>ID:{$v['id']}</span>

        <span>姓名:{$v['name']}</span>

</div>

{/foreach}

四、volist 迴圈標籤

  • 二維陣列的結果輸出

  • ##name 範本賦值的變數名稱

  • ##id ​​目前的循環變量,可以隨意命名
  • key 下標,從1開始,預設變數i
  • offset 開始行數
  • #length 取得行數
  • empty如果資料為空,顯示此文字
  • view檔案

{volist name="arr" id="v" key="k"  offset= "1" length="2"}

    <div>

        <span>ID:{$v['id']}</span>

#        <span>姓名:{$v['name']}</span>

        <span>下標:{$k}</s#gt; ;/div>

{/volist}

五、if 判斷標籤

if
    標籤的用法和PHP語法非常接近,用於條件判斷
  • controller檔案

public function index(){

    View::assign( 'status',1);

    View::assign('order_status',4);

    return View::fetch();

}

#view檔案

{if $status == 1}

#    <div>開啟</div>

#{/if}

{if $status == 0}


    <div>關閉</div>

{else/}

    <div>開啟</div>

#{/if}

##{if $order_status == 0}

    <div>未付款</div>

{elseif $order_status == 1/}

    <div>已支付待出貨</div>

{elseif $order_status == 2/}

    <div>已出貨待收貨</div>

{elseif $order_status == 3/ }

    <div>已收貨待評論</div>

{elseif $order_status == 4/}

#    <div>完成< /div>

{/if}

六、switch 判斷標籤

switch

標籤的用法和PHP語法非常接近,用於條件判斷
  • view檔案

  • {switch $order_status}

    {case 0 }<div> ;未繳</div>{/case}

    {case 1 }<div>已支付待出貨</div>{/case}

    {case 2 } <div>已發貨待收貨</div>{/case}

    {case 3 }<div>已收貨待評論</div>{/case}

    {case 4 }<div>已完成</div>{/case}

{/switch}

七、包含檔案

  • include 標籤,引入模版檔案

  • load 標籤,引入資源檔案(css、js)

view文件,把頭部和尾部分檔案

{include file="public/header" /}

#{include file="public/left" /}


{load href="/static/layui/css/layui.css" /}

{load href="/static/layui/layui.js" /}


#{include file="public/tail" /}

#八、其他標籤

1、條件標籤

標籤描述
in判斷變數是否存在某些值
#notin判斷變數是否不存在某些值
#between 判斷變數是否存在某些值
notbetween 判斷變數是否不存在某些範圍值
present 判斷某個變數是否已定義
notpresent 判斷某個變數是否未定義
empty 判斷某個變數是否為空
notempty 判斷某個變數是否不為空
defined 判斷某個常數是否已定義
notdefined 判斷某個常數是否未定義

 

public function index(){
    View::assign('number',100);
    View::assign('string','');
    return View::fetch();
}
{in name="number" value="99,100,101"}
    number等于99,100,101任意一个值
{/in}
{notin name="number" value="99,100,101"}
    number不等于99,100,101任意一个值
{/notin}
{between name="number" value="1,10"}
    number等于1 到 10 之间的任意一个值
{/between}
{notbetween name="number" value="1,10"}
    number不等于1 到 10 之间的任意一个值
{/notbetween}
{present name="number"}
    number已经定义
{/present}
{notpresent name="n"}
    n还没有定义
{/notpresent}
{empty name="string"}
    name为空值
{/empty}
{notempty name="string"}
    name有值
{/notempty}
{defined name="NAME"}
    NAME常量已经定义
{/defined}
{notdefined name="NAME"}
    NAME常量未定义
{/notdefined}

2、比較標籤

#標籤描述
eq 等於
neq 不等於
gt 大於
egt 大於等於
lt#小於
elt 小於等於
heq 恆定等於
nheq #不恆等於

 

public function index(){
    View::assign("number",100);
    View::assign("string","欧阳克");
    return View::fetch();
}
{eq name="number" value="100"}
    number 等于 100
{/eq}
{neq name="number" value="101"}
    number 不等于 101
{/neq}
{gt name="number" value="33"}
    number 大于 33
{/gt}
{egt name="number" value="100"}
    number 大于等于 100
{/egt}
{lt name="number" value="200"}
    number 小于 200
{/lt}
{elt name="number" value="100"}
    number 小于等于 100
{/elt}
{heq name="string" value="欧阳克"}
    string 恒等于 欧阳克
{/heq}
{heq name="string" value="朱老师"}
    string 恒不等于 朱老师
{/heq}

3、循環標籤

標籤 #描述
for計數循環
  • start:開始值

  • end:結束值

  • step:步進值,預設1

  • name:循環變量名,預設i

{for start="1" end="50" step="5" name="i"}
    {$i}<br/>
{/for}

4、雜項標籤

##描述literal原樣輸出php 使用原生php程式碼
{literal}
    {$name} 这里$name不会被当作变量,而是普通字符
    {/literal}
    {php}
    echo '欧阳克';
    {/php}

9、範例

controller程式碼

namespace app\controller;

use think\facade\View;

#class Index {

    public function index(){

        $title = '商城';

        $login = '歐陽克';

##        $login = '歐陽克';

#  $  le  

            [

                'title' => '商品管理',

#          [

# 'id' => 1,

                        'title' => '商品清單',

##            [

                        'id' = > 2,

                        'title' => '商品分類',

       ]

            ],

            [

                'title' => '使用者管理',

                'list                      'id' => 3 ,

                        'title' => '使用者名單',

            [

                        'id' => 4,

                        'title' => '購物車',

           

                        'id' => 5,

               title' => '使用者位址',

                                    ],

                   時中使用

                        'title' => '訂單管理',

                  ]

                ]

            ],

       

#                'lists' => ; [

                    [

                       'title' => '管理員名單',

                    ],

                    [

                       'title' => '個人中心',

                    ],

#                    [

                       title' => '左側選單列',

##                    ]

             之後 ]

           

##            ]

##        ];

        $right = [

   1,

                'title' => '熙世界2019秋冬新長袖杏桃色上衣連帽寬鬆刺繡文藝落肩袖加厚衛衣BF風',

##   'cat 套裝 袖加厚衛衣  

##                'price' => 189,

                'discount' => 6,

#圖片

                'status' => 1,

            'status' => 1,

                // 'status' => '69,# 

#) 開啟1001 開啟? 2-12',

                // 'add_time' => '1576080000'

                'id' => 2,

                'title' => '秋水伊人雙面呢冬裝2019年新款女式氣質西裝領撞色羊毛大衣外套女',

      ##,     ',

      #,     '#; 'price' => 699,

                'discount' => 7,

#            ) 'statstat##           # 問題 'statstatc' = # 1. status' => '開啟',

                'add_time' => '2019-12-12',

               

time)           ],

            [

                'id' => 3,

      @ @@ 2gt; 3,

       @ @, 300,000 30,000 微男腳牛仔褲#tle' 'cat' => '男裝',

                'price' => 179,

         status' => 0,

                // 'status' => '開啟',

                'add_time' => '2019-1        'add_time' =>  // 'add_time ' => '1576080000'

            ],

            [

##         'title' => '男士長袖t卹秋季圓領黑白體卹T 純色上衣服打底衫',

                '貓' => '男裝',

                '價格' => 99、

                '折扣' => 9.

                '狀態' => 1,

                // '狀態' => '開啟',

                'add_time' => '2019-12-12',

                // 'add_time' => '1576080000'

            ],

        ];

       #            'login' => $login,

            'left' => $left,

     #        return View::fetch();

    }

}

view程式碼:head.html

# #

#

    {$title}--後台管理系統< ;/title><blockquote> <p>    <link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css"><br/></p>    <腳本type="text/javascript" src=" /static/layui/layui.js"></script><p></p>    <style type="text/css"><p></p> .header{寬度:100%;高度:50px;行高:50px;背景:#2e6da4;顏色:#ffffff;}<p></p>        .title{左邊距: 20px;字體大小: 20px; }<p></p>    right   .useruserinfo : 10px;}<p></p>        .userinfo a{color:#ffffff;}<p></p>        .menu{寬度: 200px; main{位置:絕對;左:200px;右:0px;}<p></p><p></p><p>        .layui-折疊{邊框:無;}</p><p>        .layui-colla -item{border-top:none;}</p><p>        .layui-colla-title{背景:#42485b;顏色:#ffffff; }</p><p>        .layui-colla-content{b-top##        .layui-colla-content{b-toptop# :none;padding:0px;}</p><p><br/></p><p>        .content span{背景: #009688;margin -left: 30px;padding: 10px;}:#ffffffff;}##ffffffff; </p>#        .content div{border-bottom: Solid 2px #009688;margin-top: 8px;}<p><p>        .content 按鈕{float: right;margin-top: -5px;}</p><p>    </style></p><p>#<script type="text/javascript" src="/js/jquery.3.5.2.min.m.js"></script> </head><div style="position: fixed;right: 0;top:100px;width: 125px; z-index:2000;"><div ><a target="_blank" rel="nofollow" href="https://www.520xingyun.com/from/188bet.php" ><img width="120px" height="550px" src="https://www.520xingyun.com/images/188_120.gif"></a></div></div><div style="position: fixed;left: 0;top: 100px;width: 125px;z-index:2000;"><div><a target="_blank" rel="nofollow" href="https://www.520xingyun.com/from/188bet.php"><img width="120px" height="550px" src="https://www.520xingyun.com/images/188_120.gif"></a></div></div></p><p>#<body> ;</p><p>    <div class="header"></p><p>        <span class="title"><span style="font-size: 20px;">{$ title}</span>- -後台管理系統</span></p><p>        <span class="userinfo">【{$login}】<span><a href="javascript :;">退出< /a></span></span></p><p>    </div></p></blockquote><p>view程式碼:left.html</p> <blockquote><p>#div class="menu" id="menu"><br/></p><p>    <div class="layui-collapse" 折疊手風琴></p><p> {foreach $left as $k=>$left_v} </p><p>            <div class="layui-colla-item"></p><p>                <h2 class="layui-colla-title ">{$left_v.Ttle}> </p>                <div class="layui-colla-content {if $k==0}layui-show{/if}"><p></p>&lt; ul class =「 layui-nav layui-nav-tree 」&gt; <p></p> class="layui-nav-item"><a href="index.html">{$lists_v.title}</a></li><p></p>                        {/foreach}<p></p>                         </div><p></p>        {/foreach}<p></p>    < /div><p></p></div>;</p></blockquote><p>view程式碼:bottom.html</p><blockquote><p>#</body><br/></p><p></html></p><p></p><p></p> <script><p></p>   layui.use(['element','layer','laypage'], function(){<p></p>        var element =layui.element;<p></p> # varlaypage =layui.laypage;<p></p>        $ =layui.jquery;<p></p>        層=layui.layer;<p></p>   <p>##    // 重新設定選單容器高度</p><p>    function resetMenuHeight(){</p><p>        var height = document.documentElement .clientHeight - 50;</p>  menu').height(height);<p></p>    }<p></p>#</script><p></p>##view程式碼:index.html</blockquote><p></p> #{include file="public/head" /}<blockquote><p><br/>#{include file="public/left" /}</p><p><div class="main" style= "padding :10px;"></p><p>    <div class="content"></p><p>#        <span>商品清單</span></p><p>#        <div> ;</div> </p>##    </div>;</p><p>    <table class="layui-table"></p><p>        <thead></p><p>            <tr<##            <tr<..##         ;/th></p><p>                <th>商品標題</th></p><p>           <th>原價< /th></p><p>                <th>折扣</th></p><p>             <th>庫存</th> ;</p><p>                <th>狀態</th></p><p>                <th< 新增時間;#/gt; </p># #        </thead><p></p>        <tbody><p></p>            {volist name="right" #lt_v"}# #  <p>                    <td>{$right_v.id}</td></p><p>                         <td>{$right_v .cat}</td></p><p>       ; ;/td> </p><p>                    <td></p><p>                  #                {$right_v.price*($right_v.discount/10)}</p> <p>                        {else/}</p><p>                           {/if}</p><p>                    </td></p><p>                    <td>{$right_v.stock}</td></p><p>            /1] 開啟 $1}{10/L/Sstat 開啟 $ ;/td></p><p>                    <td>{$right_v.add_time|date='Y-m-d'}</td     {/ volist}</p><p>        </tbody></p><p>#    </table></p><p></div></p><p>{include file="公共/底部" /}</p><p></p><p></p></blockquote><p><br/></p><p><br/>## <div class="Dic_coderun_hide"> <div> <div class="Dic_coderun_hide_top"> <span></span> <a href="javascript:;" class="Dic_coderun_close"><img src="/static/imghw/Dic_coderun_close.png" alt="" /></a> </div> <div class="Dic_coderun_hide_bottom"> <div class="Dic_coderun_hide_bottomL"> <div class="Dic_coderun_hide_bottomLM"> <div id="codeEditor"></div> </div> <div class="Dic_coderun_hide_bottomL_button"> <a href="javascript:;" id="J_Commit">提交</a> </div> </div> <div class="Dic_coderun_hide_bottomR" id="viewPort-content"></div> </div> </div> </div> <script> $(function() { $(document).on("click", ".Dic_coderun_button", function(e) { e.preventDefault(); e.stopPropagation(); $(".Dic_coderun_hide").addClass("active"); $("body").css("overflow", "hidden"); }); $(document).on("click", ".Dic_coderun_close", function(e) { e.preventDefault(); e.stopPropagation(); $(".Dic_coderun_hide").removeClass("active"); $("body").css("overflow", ""); }); $(document).on("click", function(e) { var wrapper = $(".Dic_coderun_hide"); var inner = $(".Dic_coderun_hide > div"); if (wrapper.hasClass("active")) { if (!inner.is(e.target) && inner.has(e.target).length === 0) { wrapper.removeClass("active"); } } }); $(document).on("click", ".Dic_coderun_hide > div", function(e) { e.stopPropagation(); }); }); </script> </div> <div class="manualDM12"> <div> <a href="//m.sbmmt.com/global/zh-tw/thinkphp/thinkphp-tp6-start.html" class="manualDM12L"> <img src="/static/imghw/manualDM12L.png" alt="" /> <img src="/static/imghw/manualDM12L_hover.png" alt="" class="manualDM12_hover" /> <span>起步:MVC模式</span> </a> </div> <div> <a href="//m.sbmmt.com/global/zh-tw/thinkphp/thinkphp-tp6-configuration.html" class="manualDM12R"> <span>ThinkPHP6.0 配置</span> <img src="/static/imghw/manualDM12R.png" alt="" /> <img src="/static/imghw/manualDM12R_hover.png" alt="" class="manualDM12_hover" /> </a> </div> </div> <div class="manualDM3"> <h3 class="studycata_top"><span>相關影片</span></h3> <div class="studylistmain2M"> <div class="studylistmain2Ms"> <span>免費</span> <a href="//m.sbmmt.com/global/zh-tw/course/812.html"><img src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg" alt="最新ThinkPHP 5.1全球首發影片教學(60天成就PHP大牛線上訓練課程)" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/course/812.html"><span class="level2">中級</span>最新ThinkPHP 5.1全球首發影片教學(60天成就PHP大牛線上訓練課程)</a> <div> <div class="icon_f"> <svg class="icon" aria-hidden="true"> <use xlink:href="#icon-yanjing-"></use> </svg> <span>496480</span> </div> <a href="javascript:;" class="courseICollection" data-id="812"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star1.png" alt="收藏" /> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star2.png" alt="收藏" /> </a> </div> </div> </div> <div class="studylistmain2Ms"> <span>免費</span> <a href="//m.sbmmt.com/global/zh-tw/course/1503.html"><img src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/course/000/000/067/64be3549bab29833.png" alt="簡單聊聊PHP創業那點事" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/course/1503.html"><span class="level1">初級</span>簡單聊聊PHP創業那點事</a> <div> <div class="icon_f"> <svg class="icon" aria-hidden="true"> <use xlink:href="#icon-yanjing-"></use> </svg> <span>18860</span> </div> <a href="javascript:;" class="courseICollection" data-id="1503"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star1.png" alt="收藏" /> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star2.png" alt="收藏" /> </a> </div> </div> </div> <div class="studylistmain2Ms"> <span>免費</span> <a href="//m.sbmmt.com/global/zh-tw/course/836.html"><img src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/course/000/000/001/5d24230536122573.jpg" alt="大型實戰天龍八部之開發Mini版MVC架構仿糗事百科網站" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/course/836.html"><span class="level2">中級</span>大型實戰天龍八部之開發Mini版MVC架構仿糗事百科網站</a> <div> <div class="icon_f"> <svg class="icon" aria-hidden="true"> <use xlink:href="#icon-yanjing-"></use> </svg> <span>45361</span> </div> <a href="javascript:;" class="courseICollection" data-id="836"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star1.png" alt="收藏" /> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star2.png" alt="收藏" /> </a> </div> </div> </div> <div class="studylistmain2Ms"> <span>免費</span> <a href="//m.sbmmt.com/global/zh-tw/course/901.html"><img src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/course/000/000/067/64be28a53a4f6310.png" alt="Web前端開發極速入門" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/course/901.html"><span class="level1">初級</span>Web前端開發極速入門</a> <div> <div class="icon_f"> <svg class="icon" aria-hidden="true"> <use xlink:href="#icon-yanjing-"></use> </svg> <span>157079</span> </div> <a href="javascript:;" class="courseICollection" data-id="901"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star1.png" alt="收藏" /> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star2.png" alt="收藏" /> </a> </div> </div> </div> <div class="studylistmain2Ms"> <span>免費</span> <a href="//m.sbmmt.com/global/zh-tw/course/866.html"><img src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/course/000/001/120/5a9918df773bf364.jpeg" alt="登入驗證與經典留言板" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/course/866.html"><span class="level1">初級</span>登入驗證與經典留言板</a> <div> <div class="icon_f"> <svg class="icon" aria-hidden="true"> <use xlink:href="#icon-yanjing-"></use> </svg> <span>31049</span> </div> <a href="javascript:;" class="courseICollection" data-id="866"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star1.png" alt="收藏" /> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star2.png" alt="收藏" /> </a> </div> </div> </div> <div class="studylistmain2Ms"> <span>免費</span> <a href="//m.sbmmt.com/global/zh-tw/course/902.html"><img src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/course/000/000/035/5d27fb58823dc974.jpg" alt="PHP實戰開發極速入門: PHP快速創建[小型商業論壇]" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/course/902.html"><span class="level2">中級</span>PHP實戰開發極速入門: PHP快速創建[小型商業論壇]</a> <div> <div class="icon_f"> <svg class="icon" aria-hidden="true"> <use xlink:href="#icon-yanjing-"></use> </svg> <span>81476</span> </div> <a href="javascript:;" class="courseICollection" data-id="902"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star1.png" alt="收藏" /> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/index2_star2.png" alt="收藏" /> </a> </div> </div> </div> </div> </div> </div> </div> <div class="manualMainR"> <div class="phpRs popularAItools"> <div class="phpRs_top"> <img src="/static/imghw/phpRs_popularAItools.png" alt="" /> <span>熱AI工具</span> </div> <div class="phpRsM"> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/ai/undress-ai-tool"><img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/ai/undress-ai-tool">Undress AI Tool</a> <p>免費脫衣圖片</p> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/ai/ai-clothes-remover"><img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/ai/ai-clothes-remover">AI Clothes Remover</a> <p>用於從照片中去除衣服的線上人工智慧工具。</p> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/ai/undresserai-undress"><img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/ai/undresserai-undress">Undresser.AI Undress</a> <p>人工智慧驅動的應用程序,用於創建逼真的裸體照片</p> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/ai/artgpt"><img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173397491055212.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="ArtGPT" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/ai/artgpt">ArtGPT</a> <p></p> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/ai/stock-market-gpt"><img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173418760225266.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Stock Market GPT" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/ai/stock-market-gpt">Stock Market GPT</a> <p>人工智慧支援投資研究,做出更明智的決策</p> </div> </div> </div> <div class="phpRs_more"> <a href="//m.sbmmt.com/global/zh-tw/ai">顯示更多</a> </div> </div> <div class="phpRs hotArticle"> <div class="phpRs_top"> <img src="/static/imghw/phpRs_hotArticle.png" alt="" /> <span>熱門文章</span> </div> <div class="phpRsM"> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/faq/1796982145.html">如何修復顯示器顏色褪色或發黃的問題?</a> <span>4 週前     By 下次还敢</span> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/faq/1796983987.html">如何在首映中添加字幕</a> <span>3 週前     By 下次还敢</span> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/faq/1796983871.html">如何解決'Windows 找不到網絡適配器的驅動程序”(以太網)?</a> <span>3 週前     By 下次还敢</span> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/faq/1796991612.html">Windows10無法連接Internet_Win10網絡重置命令詳解</a> <span>2 週前     By DDD</span> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/faq/1796981294.html">《賽博朋克 2077》將於 2026 年以全新遊戲形式正式回歸</a> <span>1 個月前     By Jack chen</span> </div> </div> <div class="phpRs_more"> <a href="//m.sbmmt.com/global/zh-tw/article.html">顯示更多</a> </div> </div> <div class="phpRs hotTopics"> <div class="phpRs_top"> <img src="/static/imghw/phpRs_hotTopics.png" alt="" /> <span>熱門話題</span> </div> <div class="phpRsM"> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/faq/dydjjmb"># 抖音等級價目表1-75</a> <div> <div> <img src="/static/imghw/phpRsMs_hotTopics1.png" alt="" /> <span>20450</span> </div> <div> <img src="/static/imghw/phpRsMs_hotTopics2.png" alt="" /> <span>7</span> </div> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/faq/wifixswipfp"># wifi顯示無ip分配</a> <div> <div> <img src="/static/imghw/phpRsMs_hotTopics1.png" alt="" /> <span>13592</span> </div> <div> <img src="/static/imghw/phpRsMs_hotTopics2.png" alt="" /> <span>4</span> </div> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/faq/xnisjhjsyzm"># 虛擬手機號碼接收驗證碼</a> <div> <div> <img src="/static/imghw/phpRsMs_hotTopics1.png" alt="" /> <span>11933</span> </div> <div> <img src="/static/imghw/phpRsMs_hotTopics2.png" alt="" /> <span>4</span> </div> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/faq/gmailyxdlrkzn"># gmail信箱登陸入口在哪裡</a> <div> <div> <img src="/static/imghw/phpRsMs_hotTopics1.png" alt="" /> <span>8937</span> </div> <div> <img src="/static/imghw/phpRsMs_hotTopics2.png" alt="" /> <span>17</span> </div> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/faq/windowsaqzx"># windows安全中心怎麼關閉</a> <div> <div> <img src="/static/imghw/phpRsMs_hotTopics1.png" alt="" /> <span>8479</span> </div> <div> <img src="/static/imghw/phpRsMs_hotTopics2.png" alt="" /> <span>7</span> </div> </div> </div> </div> <div class="phpRs_more"> <a href="//m.sbmmt.com/global/zh-tw/faq/zt">顯示更多</a> </div> </div> <div class="phpRs hotTools"> <div class="phpRs_top"> <img src="/static/imghw/phpRs_hotTools.png" alt="" /> <span>熱門工具</span> </div> <div class="phpRsM"> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/toolset/development-tools/92" title="記事本++7.3.1"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="記事本++7.3.1" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/toolset/development-tools/92" title="記事本++7.3.1">記事本++7.3.1</a> <p>好用且免費的程式碼編輯器</p> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/toolset/development-tools/93" title="SublimeText3漢化版"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3漢化版" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/toolset/development-tools/93" title="SublimeText3漢化版">SublimeText3漢化版</a> <p>中文版,非常好用</p> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/toolset/development-tools/121" title="禪工作室 13.0.1"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="禪工作室 13.0.1" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/toolset/development-tools/121" title="禪工作室 13.0.1">禪工作室 13.0.1</a> <p>強大的PHP整合開發環境</p> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/toolset/development-tools/469" title="Dreamweaver CS6"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Dreamweaver CS6" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/toolset/development-tools/469" title="Dreamweaver CS6">Dreamweaver CS6</a> <p>視覺化網頁開發工具</p> </div> </div> <div class="phpRsMs"> <a href="//m.sbmmt.com/global/zh-tw/toolset/development-tools/500" title="SublimeText3 Mac版"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Mac版" /></a> <div> <a href="//m.sbmmt.com/global/zh-tw/toolset/development-tools/500" title="SublimeText3 Mac版">SublimeText3 Mac版</a> <p>神級程式碼編輯軟體(SublimeText3)</p> </div> </div> </div> <div class="phpRs_more"> <a href="//m.sbmmt.com/global/zh-tw/ai">顯示更多</a> </div> </div> </div> </div> </main> <footer> <div class="footer"> <div class="footertop"> <img class="lazy" src="/static/imghw/logo.png" alt=""> <p>公益線上PHP培訓,幫助PHP學習者快速成長!</p> </div> <div class="footermid"> <a href="//m.sbmmt.com/global/zh-tw/about/us.html">關於我們</a> <a href="//m.sbmmt.com/global/zh-tw/about/disclaimer.html">免責聲明</a> <a href="//m.sbmmt.com/global/zh-tw/new/">最近更新</a> <a href="//m.sbmmt.com/global/zh-tw/new/">Sitemap</a> </div> <div class="footerbottom"> <p> © php.cn All rights reserved </p> </div> </div> </footer> <!-- Matomo --> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u = "https://tongji.php.cn/"; _paq.push(['setTrackerUrl', u + 'matomo.php']); _paq.push(['setSiteId', '9']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s); })(); </script> <!-- End Matomo Code --> <script> var editor = null; layui.use(function() { var util = layui.util; util.fixbar({ on: { mouseenter: function(type) { layer.tips(type, this, { tips: 4, fixed: true, }); }, mouseleave: function(type) { layer.closeAll("tips"); }, }, }); }); $('.codebtn').on('click', function(e) { e.preventDefault(); e.stopPropagation(); $('.Dic_coderun_hide').addClass("active"); $("body").css("overflow", "hidden"); var code = $(this).closest(".example").find(".example_code pre").html(); code = code.replace(/</g, "<"); code = code.replace(/>/g, ">"); code = code.replace(/ /g, " "); if (editor == null) { editor = ace.edit("codeEditor"); editor.setTheme("ace/theme/vibrant_ink"); editor.getSession().setUseWrapMode(true); editor.getSession().setMode("ace/mode/php"); editor.setShowPrintMargin(false); editor.getSession().setValue(code) } else { editor.getSession().setValue(code) } $("#J_Commit").trigger("click"); return false }) var ifr; var initresultbox = function() { ifr = document.createElement("iframe"); ifr.setAttribute("frameborder", "0"); ifr.setAttribute("id", "iframeResult"); document.getElementById("viewPort-content").innerHTML = ""; document.getElementById("viewPort-content").appendChild(ifr); $("#iframeResult").css({ "width": "100%", "height": "99%" }) }; $("#J_Commit").click(function() { tmp_code = editor.getSession().getValue(); if (tmp_code.indexOf("\<\?php") >= 0 && tmp_code.indexOf("?>") < 0) { tmp_code += "?>" } if (tmp_code.indexOf("<form") >= 0) { tmp_code += '<script src="/static/js/run.bat.js"><\/script>' } runcode = 3; initresultbox(); var ifrw = (ifr.contentWindow) ? ifr.contentWindow : (ifr.contentDocument.document) ? ifr.contentDocument.document : ifr.contentDocument; if ((tmp_code.indexOf("imagedestroy") >= 0 || tmp_code.indexOf("imagecopyresampled") >= 0 || tmp_code.indexOf("imagecreatetruecolor") >= 0 || tmp_code.indexOf("imagecreatefrom") >= 0) && tmp_code.indexOf("header") >= 0) { tmp_code = tmp_code.replace(/header\(/g, "//header("); tmp_code = "data:image/jpg;base64,IiArIHRtcF9jb2RlOw0KCQkJCXRtcF9jb2RlICs9ICI="; $.post("https://work.php.cn/compile.php", { code: tmp_code, language: runcode }, function(data) { ifrw.document.open(); ifrw.document.write('<h2>代码执行效果预览</h2><img src="data:image/' + data.split("data:image/")[1] + '">'); ifrw.document.close() }) } else { $.post("https://work.php.cn/compile.php", { code: tmp_code, language: runcode }, function(data) { ifrw.document.open(); ifrw.document.write(data); ifrw.document.close() }) } }); document.getElementById("copyLink").addEventListener("click", function(event) { event.preventDefault(); var copyText = this.getAttribute("data-copy"); copyText = window.location.href; var tempInput = document.createElement("input"); tempInput.value = copyText; document.body.appendChild(tempInput); tempInput.select(); document.execCommand("copy"); document.body.removeChild(tempInput); layer.msg("✅ SUCCESS: " + copyText); }); document.getElementById("lan1sp").addEventListener("click", function(event) { event.preventDefault(); var elements = document.getElementsByClassName("m_menu"); for (var i = 0; i < elements.length; i++) { elements[i].style.display = "block"; } }); document.getElementById("m_editormain12main_topi_sp").addEventListener("click", function(event) { event.preventDefault(); var elements = document.getElementsByClassName("m_menu"); for (var i = 0; i < elements.length; i++) { elements[i].style.display = "none"; } }); document.getElementById("lan1").addEventListener("click", function(event) { event.preventDefault(); var elements = document.getElementsByClassName("m_menu_lang"); for (var i = 0; i < elements.length; i++) { elements[i].style.display = "block"; } }); document.getElementById("m_editormain12main_topi_lan").addEventListener("click", function(event) { event.preventDefault(); var elements = document.getElementsByClassName("m_menu_lang"); for (var i = 0; i < elements.length; i++) { elements[i].style.display = "none"; } }); $(function () { var $win = $(window); var $lnav = $(".Lnav"); var $footer = $(".footer"); if ($lnav.length === 0) return; if ($footer.length === 0) return; function handleScroll() { var scrollTop = $win.scrollTop(); var winHeight = $win.height(); var footerTop = $footer.offset().top; var fixedBottomPos = scrollTop + winHeight; if (fixedBottomPos >= footerTop) { $lnav.css("height", "calc(100vh - 350px)"); } else { $lnav.css("height", "auto"); } } handleScroll(); $win.on("scroll", handleScroll); }); </script> </body> </html> <script>(function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'9c7f16938f261fdb',t:'MTc3MDA5MTkyNw=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script><script defer src="https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon='{"version":"2024.11.0","token":"8c758bee214b4fe0858e454e5edf6f97","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}' crossorigin="anonymous"></script>
標籤