• 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

  • 相关阅读:
    iOS9下App Store新应用提审攻略
    信息安全系统设计基础第十一周学习总结
    Linux第十一次学习笔记
    信息安全系统设计基础第十周学习总结
    Linux第八次学习笔记
    Linux第七次实验笔记
    家庭作业3.67
    Linux第六次学习笔记
    Linux第五次学习笔记
    Linux第四次学习笔记
  • 原文地址:https://www.cnblogs.com/umgsai/p/3908103.html
Copyright © 2020-2023  润新知