5ucms论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 6572|回复: 1
打印 上一主题 下一主题

[2.x] 2、POPASP快速入门第二课 hello world与mvc

[复制链接]

670

主题

785

帖子

8228

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
8228
跳转到指定楼层
楼主
发表于 2019-4-1 14:32:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
index.asp

  1. <!--#include file="../popasp_2.0/popasp.asp"-->
  2. <%
  3. const APP_PATH = "test"
  4. POP_MVC.run
  5. Call A_("Index/test")
  6. %>
  7. <strong><%=V_("tip")%></strong><br />
  8. <strong><%=V_("var")%></strong><br />
  9. <p>
  10. <%=V_("stress")%>
  11. </p>
复制代码


IndexAction.class.asp

  1. <%
  2. ' 本类由系统自动生成,仅供测试用途
  3. Class IndexAction
  4.     public Sub index()
  5.                 Response.write "<h1 style=""font-size:80px;margin:30px 0 10px 30px;font-family:'微软雅黑';font-weight: normal;"">:)</h1><p style=""line-height:1.8em;font-size: 36px;margin:0 0 0 30px;font-family:'微软雅黑';font-weight: normal;"">欢迎使用 <b>POPASP</b>!</p>"
  6.     end Sub
  7.         
  8.         Public Sub test
  9.                 '通过控制器给视图分配变量
  10.                 '在POPASP中是通过that.assign方法来分配变量
  11.                 that.assign "tip","Hello POPASP"
  12.                 that.assign "var","我是一个变量哦"
  13.                 that.assign "stress","视频中,忘了说明一点,变量标识是区分大小写的。"
  14.         End Sub
  15. End Class
  16. %>
复制代码


注意事项:原生的asp程序一般不区分大小写,此框架部分位置区分,邱嵩松也建议大家养成区分习惯。因为像js php都是区分的。
一个程序员不能只懂一门语言。
回复

使用道具 举报

670

主题

785

帖子

8228

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
8228
沙发
 楼主| 发表于 2019-4-1 15:11:11 | 只看该作者
that.assign 分配 变量 与 值
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|5ucms.com

GMT+8, 2024-4-20 05:17 , Processed in 0.312500 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表