How to disable direct access to a file


Posted on 16th Feb 2014 07:03 pm by admin

Suppose I've 2 Files. 1.php & 2.php

I don't want anybody to access 2.php directly from browser. Eg: http://localhost/2.php but I want 2.php show up in 1.php like:
Line number On/Off | Expand/Contract<?phpinclude("2.php");?>
Did you know?Explore Trending and Topic pages for more stories like this.

My question is how can I disable direct access using php not .htaccess
No comments posted yet

Your Answer:

Login to answer
299 Like 38 Dislike
Previous forums Next forums
Other forums

fopen() security
As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw

unexpected T_VARIABLE error
Hey all! I'm getting an unexpected T_VARIABLE with the following function:

function getHighes

need help in creating captcha
hi i have a problem creating captcha system. i create some basic script for image displaying but it

BI in Upstream Production operations
Appreciate if you can assist in the following areas:
1) Examples of life before and after BI i

Help to integrate whois Domain Details to website
Hi,

can i know is their any php script r methods to add domain details to my website.

Applet JTextField Size Problem
Hello,

I recently started making an applet to calculate certain values for airplanes. However

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about bec

Parse String
I need to parse the string below into three variables. How would I do that?

john + 10/20/2008

cURL Upload Help
OK, I am creating a bridge from a local program to my website and I am trying to find the best way t

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash