iwebshop二次开发
2024-10-10 01:07:51
1.iwebshop中写hello world
① 动作action方式
controllers目录下,然后创建text.php.
<?php
class Test extends IController
{
public function hello()
{
echo"欢迎使用Iweb框架!";
}
}
?>
这里的文件名,要和类名一样,类名首字母要大写
②通过视图Action来运行
在views目录下的default目录下的test目录,创建hello.html文件。注释掉第一种方式。
<h1 style='color:#F00'>hello world</h1>
修改test的控制器类:
如何添加layout的布局。
<?php
class Test extends IController
{
public $layout='site';
}
?>
注意清除一下缓存,运行效果:
二次开发快递管理登录页面
<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>
本文出自 “阿凡达” 博客,请务必保留此出处http://shamrock.blog.51cto.com/2079212/1317682
最新文章
- ASP.NET Web API 过滤器创建、执行过程(一)
- 在Web中使用Windows控件
- JVM内存模型与性能调优
- .NET环境下上传和下载Word文件
- 非空二叉树的一个有趣的性质:n0 = n2 + 1
- OpenGL、Open Inventor、WebGL、Three.js、ARToolkit、JSARToolkit
- poj2187Beauty Contest(凸包直径)
- 【Todo】InnoDB、MyISAM、数据库引擎
- C#-datagridview设置列宽
- Oracle数据库的安装详解
- java学习笔记 --- 异常
- 【Struts2的执行流程,这个博主写的很详细】
- Node.js 中的 stream
- 王者荣耀交流协会final发布-第3次scrum立会
- 日期T转换
- Spring04-SpringEL&;Spring JDBC数据访问
- HDFS简单编程实例:文件合并
- viewstate?
- 奇怪吸引子---LuChen
- LATCH_EX
热门文章
- datatable绑定comboBox显示数据[C#]
- APP图标和启动页
- Android高工必备技能
- Leetcode 270. Closest Binary Search Tree Value
- 【BZOJ-2286】消耗战 虚树 + 树形DP
- 【BZOJ-3578】GTY的人类基因组计划2 set + map + Hash 乱搞
- BZOJ1178 [Apio2009]CONVENTION会议中心
- Uva11464 Even Parity
- HTTP Header Injection in Python urllib
- linux下制作win7安装盘(mint、ubuntu、debian)