<html>
<head>
<title>xxxxxxxx</title>
</head>
<body>
<?
echo "hello";
?>
</body>
</html> 为什么只显示头部xxxx,不显示正文 hello 呢?
<head>
<title>xxxxxxxx</title>
</head>
<body>
<?
echo "hello";
?>
</body>
</html> 为什么只显示头部xxxx,不显示正文 hello 呢?
是不是另存为html,然后双击打开的?
http://127.0.0.1:8080/test/show.php
<body>
1111111111
<?
echo "hello";
?>
</body>
<?php
phpinfo();
?>
要不你这样:
<?php
echo "hello";
?>
试试
php 5 默认不支持短标记的,就是 <? ?> 这样的标记,<?php ?> 是完整的 可以在 php.ini 设置, short_open_tag