亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

The source code generated by thinkphp5 tags is confusing
迷茫
迷茫 2017-06-26 10:49:22
0
1
898
        <ul class="nav sidebar-menu">
            <li {eq name="$url" value="index"}class="active"{/eq}>
                <a href="{:url('/admin/index/index')}">
                    <i class="menu-icon glyphicon glyphicon-home"></i>
                    <span class="menu-text"> 后臺首頁 </span>
                </a>
            </li>
            {volist name="nav" id="vo"}
            <li>
                <a href="#" class="menu-dropdown">
                    <i class="menu-icon fa {$vo.icon}"></i>
                    <span class="menu-text"> {$vo.title} </span>
                    <i class="menu-expand"></i>
                </a>

                <ul class="submenu">
                    {volist name="vo['children']" id="sub"}
                    <?php $sname=substr($sub['name'],0,strpos($sub['name'], '/')); ?>
                    <li {eq name="$url" value="$sname"}class="active"{/eq}>
                        <a href="/admin/{$sub.name}">
                            <span class="menu-text">{$sub.title}</span>
                        </a>
                    </li>
                    {/volist}
                </ul>
            </li>
            {/volist}
        </ul>

The above code arrangement is standard, but I don’t know why the tp5 loop is completely messed up
It becomes the following

        <ul class="nav sidebar-menu">
            <li >
                <a href="/admin/index/index">
                    <i class="menu-icon glyphicon glyphicon-home"></i>
                    <span class="menu-text"> 后臺首頁 </span>
                </a>
            </li>
                        <li>
                <a href="#" class="menu-dropdown">
                    <i class="menu-icon fa fa-dropbox"></i>
                    <span class="menu-text"> 產(chǎn)品 </span>
                    <i class="menu-expand"></i>
                </a>

                <ul class="submenu">
                                    </ul>
            </li>
                        <li>
                <a href="#" class="menu-dropdown">
                    <i class="menu-icon fa fa-user"></i>
                    <span class="menu-text"> 管理員 </span>
                    <i class="menu-expand"></i>
                </a>

                <ul class="submenu">
                                        <li >
                        <a href="/admin/user/lst">
                            <span class="menu-text">管理員列表</span>
                        </a>
                    </li>
                                        <li class="active">
                        <a href="/admin/authrule/lst">
                            <span class="menu-text">權(quán)限列表</span>
                        </a>
                    </li>
                                        <li >
                        <a href="/admin/authgroup/lst">
                            <span class="menu-text">用戶組</span>
                        </a>
                    </li>
                                    </ul>
            </li>
                        <li>
                <a href="#" class="menu-dropdown">
                    <i class="menu-icon fa fa-gear"></i>
                    <span class="menu-text"> 系統(tǒng)設(shè)置 </span>
                    <i class="menu-expand"></i>
                </a>

                <ul class="submenu">
                                        <li >
                        <a href="/admin/conf/lst">
                            <span class="menu-text">配置列表</span>
                        </a>
                    </li>
                                        <li >
                        <a href="/admin/conf/conf">
                            <span class="menu-text">配置項(xiàng)</span>
                        </a>
                    </li>
                                    </ul>
            </li>
                    </ul>

<li> and </ul> are not displayed according to the correct indentation. Although the page is not affected, it is very confusing when viewing the source code.

迷茫
迷茫

業(yè)精于勤,荒于嬉;行成于思,毀于隨。

reply all(1)
扔個(gè)三星炸死你

First of all, what you write here is a template language. The TP background is to further convert it into PHP code and then execute it. During the process of converting PHP, the generated code is completely different from the code you see. There may be a lot more. Or less. Some spaces and so on are ignored, and some have extra spaces and line breaks.

So, the code given to the browser will become what you see, mainly because of the inconsistency between spaces and line breaks.

Finally, the source code is not for others to see, the code in your editor is. No matter how messy it is, the browser just needs to recognize it. You can look at some websites and all the HTML codes are squeezed together because they have been compressed. But it doesn't matter, so don't worry about it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template