thinkphp mysql做的网站从哪些方面下手着手优化速度

WBOY
Release: 2016-06-06 20:19:31
Original
1397 people have browsed it

现在用的阿里云的服务器
1G 内存 几乎没人访问

感觉加载速度好慢

thinkphp mysql做的网站从哪些方面下手着手优化速度

<code><div class="sui-row-fluid">


    <div class="span1 column ui-sortable">

        <ul class="sui-nav nav-list">
            <li class="displayBookmark"><a href="__MODULE__/Bookmark/displayBookmark">书签管理</a></li>
            <li class="displayBookmarkcategory"><a href="__MODULE__/Bookmarkcategory/displayBookmarkcategory">书签分类</a></li>
        </ul>

    </div>

    <div class="span11 column ui-sortable">

        <a id="create" href="javascript:void(0);" class="sui-btn btn-large btn-primary">新增分类</a>

        <table class="sui-table table-bordered table-zebra table-primary" id="refresh">
            <thead>
                <tr>
                    <th>书签分类名称</th>
                    <th>书签分类描述</th>
                    <th>书签分类排序</th>
                    <th>操作</th>


                </tr>
            </thead>
            <tbody>
                <volist name="list" id="vo">
                    <tr>
                        <td>
                            <if condition="$vo.bookmarkcategory_pid eq 0">
                                |--{$vo.bookmarkcategory_name}
                                <else></else>
                                        |--{$vo.bookmarkcategory_name}
                            </if>
                        </td>
                        <td>{$vo.bookmarkcategory_desc}</td>
                        <td>{$vo.bookmarkcategory_sort}</td>
                        <td>
                            <a class="sui-btn btn-sm btn-warning" href="javascript:void(0)" id="{$vo.bookmarkcategory_id}_update">
                                改
                            </a>

                            <a class="sui-btn btn-sm btn-danger" href="__MODULE__/Bookmarkcategory/deleteBookmarkcategory/id/%7B%24vo.bookmarkcategory_id%7D/con/0" onclick="if (!confirm('确认要删除?')) {window.event.returnValue = false;}">
                                删
                            </a>
                        </td>
                    </tr>
                </volist>


            </tbody>
        </table>
    </div>
</div>

         
  

<script>
    $(document).ready(function(){


    $("#create").click(function(){
        layer.open({
            type: 2, {/*0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)*/}
            title: '新增书签分类',
            shadeClose: true,{/*是否点击遮罩关闭*/}
            shade: [0.3],
            area: ['400px', '450px'],
            content: "__MODULE__/Bookmarkcategory/createBookmarkcategory",
            closeBtn:1, {/*0代表无关闭按钮  1很小的关闭按钮  2是圆角关闭按钮 */}
            shift:0,{/*动画 0无 1-6*/}
            maxmin: true,{/*显示最大小化按钮*/}
          //skin: 'layui-layer-rim', //加上边框
            cancel: function () {
            location.reload();
        }
          });
    });


        function re(){
        <volist name="list" id="vo">
                    $("#{$vo.bookmarkcategory_id}_update").click(function(){
                        layer.open({
                            type: 2, {/*0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)*/}
                            title :'修改书签分类',
                            shadeClose: true,{/*是否点击遮罩关闭*/}
                            shade: [0.3],
                            area: ['400px', '450px'],
                            content: '__MODULE__/Bookmarkcategory/updateBookmarkcategory/id/{$vo.bookmarkcategory_id}',
                            closeBtn:1, {/*0代表无关闭按钮  1很小的关闭按钮  2是圆角关闭按钮 */}
                            shift:0,{/*动画 0无 1-6*/}
                            maxmin: true,{/*显示最大小化按钮*/}
                          //skin: 'layui-layer-rim', //加上边框
                            cancel: function () {
                                $("#refresh").load(location.href+" #refresh>*",function(){
                                    re();
                                });
                            }
                        });
                    });
        
        }
        re();

        {/*jquery end*/}
    });
</script>

</code>
Copy after login
Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!