Home > Backend Development > PHP Tutorial > Methods to prevent direct access, viewing or downloading of the config.php file

Methods to prevent direct access, viewing or downloading of the config.php file

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-25 09:04:41
Original
1287 people have browsed it
  1. define('IN_SYS', TRUE);
Copy code

2 Get this variable in config.php

  1. if(!defined('IN_SYS')) {
  2. exit('Access Forbidden');
  3. }
Copy the code

In this way, undefined free viewing or downloading is achieved .



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