dqu94359 2012-09-29 14:23
浏览 49
已采纳

ASP是否允许您从PHP等脚本标签中逃脱?

Can you escape in and out of ASP tags like how PHP can exit out of parsing mode? For instance, in PHP, you can exit in the middle of a code block, which is useful if you want to show long chunks of HTML code.

<?php if ($expression == true) { ?>

    <h1>This will show if the expression is true.</h1>
    <p>I can put lots of HTML code here.</p>

<?php } ?>
  • 写回答

1条回答 默认 最新

  • duandu8707 2012-09-29 14:28
    关注

    You can.

     <% if (expression) then %>
         <h1>This will show if the expression is true.</h1>  
         <p>I can put lots of HTML code here.</p>  
     <% end if %>
    

    The kind of spaghetti like mess that this could create was one of the major flaws in classic ASP, unless one made strenuous efforts to keep ones code manageable.

    I'm not sure why you'd want to use classic ASP though. (Or php, for that matter)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 chaquopy python 安卓
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 有没有帮写代码做实验仿真的
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥30 vmware exsi重置后登不上
  • ¥15 易盾点选的cb参数怎么解啊
  • ¥15 MATLAB运行显示错误,如何解决?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题