Home > Backend Development > PHP Tutorial > PHP:任意文件格式以html展示

PHP:任意文件格式以html展示

WBOY
Release: 2016-06-06 20:45:03
Original
1151 people have browsed it

将一个html文件保存成后缀为aaa(或其他任意格式)的文件(如:test.aaa),然后在浏览器中打开的时候,发现浏览器没法以网页形式展示,而是将test.aaa中的html源码显示出来。
而如果保存成:test.html的话,在网页中是正常的。
比如:在网站根目录下,有2个文件:test.html和test.aaa
代码如下:

<code>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">


<input type="bottom" value=""></code>
Copy after login
Related labels:
php
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