5ucms论坛

标题: 2、POPASP快速入门第二课 hello world与mvc [打印本页]

作者: admin    时间: 2019-4-1 14:32
标题: 2、POPASP快速入门第二课 hello world与mvc
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都是区分的。
一个程序员不能只懂一门语言。
作者: admin    时间: 2019-4-1 15:11
that.assign 分配 变量 与 值




欢迎光临 5ucms论坛 (http://bbs.5ucms.com/) Powered by Discuz! X3.2