1.iwebshop中写hello world

① 动作action方式

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

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

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

650) this.width=650;" src="http://img1.51cto.com/attachment/201310/135901889.jpg" title="QQ截图20131031135830.jpg" alt="135901889.jpg" />

②通过视图Action来运行

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

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

650) this.width=650;" src="http://img1.51cto.com/attachment/201310/140034643.jpg" title="2.jpg" alt="140034643.jpg" />

修改test的控制器类:

如何添加layout的布局。

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

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

650) this.width=650;" src="http://img1.51cto.com/attachment/201310/140149665.jpg" title="3.jpg" alt="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>

650) this.width=650;" src="http://img1.51cto.com/attachment/201310/140424916.jpg" title="4.jpg" alt="140424916.jpg" />

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

最新文章

  1. ASP.NET Web API 过滤器创建、执行过程(一)
  2. 在Web中使用Windows控件
  3. JVM内存模型与性能调优
  4. .NET环境下上传和下载Word文件
  5. 非空二叉树的一个有趣的性质:n0 = n2 + 1
  6. OpenGL、Open Inventor、WebGL、Three.js、ARToolkit、JSARToolkit
  7. poj2187Beauty Contest(凸包直径)
  8. 【Todo】InnoDB、MyISAM、数据库引擎
  9. C#-datagridview设置列宽
  10. Oracle数据库的安装详解
  11. java学习笔记 --- 异常
  12. 【Struts2的执行流程,这个博主写的很详细】
  13. Node.js 中的 stream
  14. 王者荣耀交流协会final发布-第3次scrum立会
  15. 日期T转换
  16. Spring04-SpringEL&amp;Spring JDBC数据访问
  17. HDFS简单编程实例:文件合并
  18. viewstate?
  19. 奇怪吸引子---LuChen
  20. LATCH_EX

热门文章

  1. datatable绑定comboBox显示数据[C#]
  2. APP图标和启动页
  3. Android高工必备技能
  4. Leetcode 270. Closest Binary Search Tree Value
  5. 【BZOJ-2286】消耗战 虚树 + 树形DP
  6. 【BZOJ-3578】GTY的人类基因组计划2 set + map + Hash 乱搞
  7. BZOJ1178 [Apio2009]CONVENTION会议中心
  8. Uva11464 Even Parity
  9. HTTP Header Injection in Python urllib
  10. linux下制作win7安装盘(mint、ubuntu、debian)