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

GMail like Chat in ASP.NET
Hi,Can anyone suggest me, how to incorporate GMail like chat in my existing ASP.Net application.I wa

LOOPing Problem
Hello All!

The following code loops through the data and displays the data accordingly. My p

Multithreading design
Hi

I have come up with a Singleton class that manages a pool of database connections. Basical

EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t

Mail functionality from localhost to server
Hi

I am facing problem of mail functionality.

When i tested mail functionality in my

session variable problem
Session variable is not working in Fire fox i am getting null value but it is working fine in IE.

ASP.NET Validation Event Cycle
Hi,
I have asp button as follow:

Getting rid of quotes when printing data
Hi Guys, I use the filter_var FILTER_SANITIZE_STRING to filter the textarea input. The function esca

output_buffering so rewrite
I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish

Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields

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