通过查看html源码能够看到文件及路径,怎么保护核心文件如config.php

WBOY
Release: 2016-06-13 13:44:38
Original
1148 people have browsed it

通过查看html源码能够看到文件及路径,如何保护核心文件如config.php
打开浏览器都有查看源文件的功能,我写的程序路径啥的都暴露了,如果下载一个config.php也很简单,一旦下载就能看到数据库用户名密码,如何能够保护??

------解决方案--------------------
不要把这些文件放在http能访问的目录下。放到一个用户不能访问的目录,然后配置好你的php.ini的include路径就可以了。

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!