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

how to get different value in second view of webdynpro?
hello guys,

In ABAP webdynpro I am trying to create one application having two views.

parse error
On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show

multipart emiail forms
Hi All,

I am new to the boards and I've been working on a form (which is rather massive, imo

GIS appliction help
I found some tutorials in the internet to develop a map application I don't want to use google maps

Displaying a record from mysql in a simple swf file
Hi,

I have a mysql database containing information I would like to display in my swf.

md5 is it unique
I know this is most likely one of many simple questions that can be found semi easily. But I'm press

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

ob_ dynamic content
i was wondering about the potential to use ob to create a <div then remove it when the page

xml
<?php

echo "<h1>XML Articles</h1>";

$home

Solution Manager BPR
Does the SolMan-BPR-ARIS-Integration (http://www.ids-scheer.com/en/ARIS/ARIS_Platform/ARIS_Business_

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