当我们echo
在 PHP 中使用时,引号内的代码是 HTML。
在我使用的一些 HTML 编辑器中,它们只是以一种颜色突出显示所有 HTML,因此有点混乱。
有没有可以在里面着色的IDE echo
?
唯一真正让您感到困惑的是回显 HTML 是否有很多。你总是可以:
echo {
?>
HTML
<?php
}
Do you mean the colouring for text inside " "? Try PHPStorm (http://www.jetbrains.com/phpstorm/). They offer a 30 day free license to try out the product.
I'm not fully confident I understand what you want, but I believe you're asking if a code editor can also do HTML syntax-highlighting for HTML that exists inside PHP's echo/print
statements. Normally not, because most editors see these as strings
. However, you can embed PHP into HTML and that usually works a lot better:
<h1><?php print $someVar ?></h1>
If I misunderstood you, and you want syntax-highlighting for the web page...
There are plenty of javascript-based syntax-highlighters out there:
尝试使用记事本++。它对许多脚本语言都很方便。这是下载链接Notepad++ 下载链接。它也是免费的。我们将其用于 javascript 编辑。它也适用于php