Maison  >  Article  >  développement back-end  >  这么写是为啥?运行过程是怎样的

这么写是为啥?运行过程是怎样的

WBOY
WBOYoriginal
2016-06-13 13:19:52623parcourir

这样写是为啥?运行过程是怎样的?

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
<?php>
    try
    {
      if(xxx)
      {
>
//html代码
<?php>
      }   //end of if
    }   //end of try
>



------解决方案--------------------

try
{
if(xxx)
{
>
//html代码


我不清楚你说的断开写是什么情况,
但在 ?>和------解决方案--------------------
运行过程就是从上至下,这么写的好处无非是省略了PHP的echo,然后在一定程度上使得程序的结构比纯PHP代码要清晰。所有的代码还是归PHP解释器解析的。
Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn