zoukankan      html  css  js  c++  java
  • iwebshop二次开发

    1.iwebshop中写hello world

    ① 动作action方式

    controllers目录下,然后创建text.php.

    <?php
    class Test extends IController
    {
        public function hello()
        {
            echo"欢迎使用Iweb框架!";
        }
    }
    ?>

    这里的文件名,要和类名一样,类名首字母要大写

    135901889.jpg

    ②通过视图Action来运行

    在views目录下的default目录下的test目录,创建hello.html文件。注释掉第一种方式。

    <h1 style='color:#F00'>hello world</h1>

    140034643.jpg

    修改test的控制器类:

    如何添加layout的布局。

    <?php
    class Test extends IController
    {
        public $layout='site';
    }
    ?>

    注意清除一下缓存,运行效果:

    140149665.jpg



    二次开发快递管理登录页面

    <html>
    <head>
    </head>
    <body>
    <h1 style='color:#F00'>快递管理页面</h1>
    <div class="wrap_box">
    <div class="box login_box clearfix">
    <form action='/ydl/index.php?controller=simple&action=login_act' method='post'>
        <input type="hidden" name='callback' />
        <table width="515" class="form_table f_l">
            <tr><th>用户名:</th><td><input class="gray" type="text" name="login_info" value="" pattern='required' alt='填写用户名或邮箱' /></td></tr>
            <tr><th>密码:</th><td><input class="gray" type="password" name="password" pattern='^S{6,32}$' alt='填写密码' /></td></tr>
            <tr><td></td>
                <td>
                    <label class="attr"><input class="radio" type="checkbox" name="remember" value='1' />记住登录名</label>
                    <label class="attr"><a class="link pwd" href="/ydl/index.php?controller=simple&action=find_password">忘记密码</a></label>
                </td>
            </tr>
            <tr>
                <td></td>
                <td></td>
            </tr>
            <tr><td></td><td><input class="submit_login" type="submit" value="登录" /></td></tr>
        </table>
    </form>
    </div>
    </div>
    </body>
    </html>

    140424916.jpg

    本文出自 “阿凡达” 博客,请务必保留此出处http://shamrock.blog.51cto.com/2079212/1317682

  • 相关阅读:
    hihocoder 1388 Periodic Signal
    HDU 5880 Family View (AC自动机)
    HDU 5889 Barricade (bfs + 最小割)
    UVa 10806 Dijkstra, Dijkstra (最小费用流)
    POJ 3169 Layout (差分约束)
    差分约束系统学习
    HDU 3062 病毒侵袭持续中 (AC自动机)
    HDU 2896 病毒侵袭 (AC自动机)
    HDU 2222 Keywords Search (AC自动机)
    项目管理工具Leangoo,截止日期终于变绿色了
  • 原文地址:https://www.cnblogs.com/umgsai/p/3908103.html
Copyright © 2011-2022 走看看