Home  >  Article  >  Backend Development  >  zend studio代码显示解决方法

zend studio代码显示解决方法

WBOY
WBOYOriginal
2016-06-13 09:59:08914browse

zend studio代码显示

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><title></title><script type="text/javascript">    function xx(){        var ii;        ii = 'F';        alert(ii);        <?php            $tt =1;        if ($tt==1)        {        ?>            var cc;             cc = 'P';          alert(cc);        <?php        }        ?>        var uu;        uu = 'weiweipxbuu'        alert(uu);    }</script><input type="button" value="Hit Me" onclick="xx()"> 

在js中嵌入php代码后,这段php代码后面的js代码字体都变成了黑色的。虽然没有错误但是不便宜阅读。

------解决方案--------------------
那种ide都没有办法很好的处理的这2种语法相交叉的使用,或者你可以这样用
HTML code
<title></title><script type="text/javascript">    function xx(){        var ii;        ii = 'F';        alert(ii);        /**<?php            $tt =1;        if ($tt==1)        {        ?>**/            var cc;             cc = 'P';          alert(cc);        /**<?php        }        ?>**/        var uu;        uu = 'weiweipxbuu'        alert(uu);    }</script><input type="button" value="Hit Me" onclick="xx()"><div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn