The html file and the php file have the same content, but the opening effect is different?

WBOY
Release: 2016-10-18 08:41:54
Original
1164 people have browsed it
<code><html>
<head>
<meta charset="utf-8">
<title>展示学生资料</title>
</head>
<body>
<?php  $name="王六"; ?>
    <table>
        <tr>
            <td>姓名</td>
            <td><?php echo $name;?></td>
        </tr>
    </table>
</body>
</html>
</code>
Copy after login

The above program is saved as test.php and opened with a browser, and the displayed result is as follows
Name Wang Liu
When the above program is saved as test.html, opened with a browser, the displayed result is as follows
Name
The php in it is not parsed ?
Same content, different file types, why are there different results?

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!