IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    php if条件嵌套html

    admin发表于 2015-09-29 08:01:34
    love 0

    页面逻辑如下:

    <?php
    if(empty($_GET['action'])){
        $cuid = get_baidu_cuid();
        if($cuid !== false){
            $result = isOrder($cuid, GAME_NAME);
        }else{
            echo '<script>alert("\u8bf7\u5728\u767e\u5ea6\u624b\u673a\u52a9\u624b\u4e2d\u6253\u5f00\u6b64\u9875")</script>';
            exit;
        }
    ?>
        html code to run if condition is true
        <?php
            if ( $result ) {
        ?>
        html code to run if condition is true
        <?php
            } else {
        ?>
        html code to run if condition is true
        <?php
            }
        ?>

    © admin for 可乐吧, 2015. | Permalink | No comment | Add to del.icio.us
    Post tags:

    您可能也喜欢:
    HTML代码的美感(转)
    国外PHP大师给初学者的8条建议
    HTML5标准计划在2014年完成
    ie条件注释语句简介、属性、示例
    无觅

    Feed enhanced by Better Feed from Ozh



沪ICP备19023445号-2号
友情链接