PHP protects internal files from being accessed

WBOY
Release: 2016-07-29 09:06:12
Original
1136 people have browsed it

If it is a php file loaded by internal require and is not displayed in the URL, how can it be better protected?

First write

<code><span><span>define</span></span>(<span>'IN_SYS'</span>, <span>true</span>);</code>
Copy after login

in the entry file and then write a sentence at the beginning of other internal files

<code><span>if</span>(!<span>defined</span>(<span>'IN_SYS'</span>)) <span>die</span>(<span>'Access Denied!'</span>);</code>
Copy after login
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces PHP to protect internal files from being accessed, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

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