zend studio代码显示解决方法

WBOY
Release: 2016-06-13 13:53:46
Original
893 people have browsed it

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()">


 

Copy after login

在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>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template