Home >Backend Development >PHP Tutorial >PHP protects internal files from being accessed
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>
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>').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.