EZPublish控制结构详解.docxVIP

  • 1
  • 0
  • 约9.51千字
  • 约 7页
  • 2018-11-16 发布于江苏
  • 举报
EZPublish控制结构详解

本电子书由站长百科( HYPERLINK / )教程组制作 出处:站长百科 原文地址: HYPERLINK /wiki/EZ_Publish/EZ_Publish_模板控制结构 /wiki/EZ_Publish/EZ_Publish_模板控制结构 本电子书整理自站长百科 HYPERLINK /wiki/EZ_Publish/EZ_Publish_模板控制结构 EZ_Publish/EZ_Publish_模板控制结构词条,查看内容请访问网站。 EZ Publish模板控制结构详解 出处:站长百科 原文地址:HYPERLINK /wiki/EZ_Publish/EZ_Publish_模板控制结构/wiki/EZ_Publish/EZ_Publish_模板控制结构 本电子书整理自站长百科HYPERLINK /wiki/EZ_Publish/EZ_Publish_模板控制结构EZ_Publish/EZ_Publish_模板控制结构词条,查看内容请访问网站。 HYPERLINK /wiki/EZ_Publish \o EZ Publish eZ Publish 模板语言提供了以下的控制结构: ? IF-THEN-ELSE ? HYPERLINK /wiki/index.php?title=SWITCHaction=editredlink=1 \o SWITCH (尚未撰写) SWITCH ? HYPERLINK /wiki/index.php?title=WHILEaction=editredlink=1 \o WHILE (尚未撰写) WHILE ? DO...WHILE ? FOR ? FOREACH IF-THEN-ELSE 参阅下例: 例1: {if eq( $var, 128 )} Hello world br / {else} No world here, move along. br / {/if} 例2: {if eq( $fruit, apples )} Apples {elseif eq( $fruit, oranges )} Oranges {else} Bananas {/if} SWITCH {switch match=$fruits} {case match=apples} Apples {/case} {case match=oranges} Oranges {/case} {case} Unidentified fruit! {/case} {/switch} 如果$fruits 初始值为oranges,则输出: Oranges WHILE {while ne( $counter, 8 )} Print this line eight times ({$counter}) br / {set $counter=inc( $counter )} {/while} 如果$counter 初始值为0,则输出: Print this line eight times (0) Print this line eight times (1) Print this line eight times (2) Print this line eight times (3) Print this line eight times (4) Print this line eight times (5) Print this line eight times (6) Print this line eight times (7) DO...WHILE {do} Keep printing this line ({$counter}) br / {set $counter=inc( $counter )} {/do while ne( $counter, 8 )} 如果$counter 初始值为0,则输出: Keep printing this line (0) Keep printing this line (1) Keep printing this line (2) Keep printing this line (3) Keep printing this line (4) Keep printing this line (5) Keep printing this line (6) Keep printing this line (7) Keep printing this line (8) FOR {for 0 to 7 as $counter} Value of counter: {$counter} br / {/for} 输出: Value of counte

文档评论(0)

1亿VIP精品文档

相关文档