Home  >  Article  >  Backend Development  >  PHP实用大全

PHP实用大全

WBOY
WBOYOriginal
2016-06-23 14:33:32923browse

一、设置Apache隐藏或伪装php文件后缀:
1.将PHP隐藏为其它语言
在httpd.conf里任意位置添加下面这一行
# Make PHP code look like other code types
AddType application/x-httpd-php .asp .pl .jsp aspx

2.对 PHP 使用未知扩展名
在httpd.conf里任意位置添加下面这一行
# Make PHP code look like unknown types
AddType application/x-httpd-php .bop .foo .saki .los

3.对 PHP 使用 HTML 扩展名
在httpd.conf里任意位置添加下面这一行
# Make all PHP code look like html
AddType application/x-httpd-php .htm .html

重启apache.把PHP文件名改为上面所设置的文件后缀名.

Statement:
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
Previous article:PHP strtotime() 函数Next article:php 输入输出流