为什么< br>和< hr>标签在PhpStorm中不起作用 [英] Why <br> and <hr> tag don't work in PhpStorm

查看:232
本文介绍了为什么< br>和< hr>标签在PhpStorm中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<br><hr>标记在PhpStorm中不起作用,当我在PhpStorm中运行index.php文件时,使用以下代码:

The <br> and <hr> tags don't work in PhpStorm and when I'm running my index.php file in PhpStorm whit this code :

<?php
$a=10;
echo "This is $a";
echo "\n";
echo 'This is $a';
echo "\n";
echo "<hr>";
echo "<br>";
print "This is $a";
?>

我在控制台中得到了这个

I'm getting this in console:

This is 10
This is $a
<hr><br>This is 10

为什么会这样?

推荐答案

PHPStorm控制台向您显示您的 exact 输出.而且很准确.

The PHPStorm console is show you your exact output. And It's accurate.

<hr><br>标记是HTML.在控制台中,您将像这样看到它们.

The <hr> and <br> tags are HTML. In the console you'll see them just like this.

当您在网络浏览器中加载页面时,这些HTML标记将按照您的期望显示为水平线和空白行.

When you load your page in a web browser those HTML tags will display as a horizontal rule and a blank line, as you expect.

有关PHPStorm提供的用于运行PHP代码的不同选项的更多信息,请参见此处:

See here for more info about the different options PHPStorm provides for running your PHP code:

https://www.jetbrains.com/phpstorm/help/running-php-applications.html

这篇关于为什么&lt; br&gt;和&lt; hr&gt;标签在PhpStorm中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆