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");?>

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

 formating when pulling data from a mysql database 
Ok so Im not to sure if this is the right thread to post in but here is my catch 22 issue.

I

split values
I have values that are returned to me in this format:

name=>test,age=>49

OOP help
okay so i have a class im making it has everything setup i just need to randomize the 2 variables an

Apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

single page with referrer to show correct page
I have a simple website with a couple of different pages. I would like to be able to in a div tag w

Image DPI
Hi.

I allow users to upload images, the user then is able to adjust several settings for the

Typing math
I've added support for typesetting math using LaTeX on the forums.

Example:
Code: [Select]

Trouble verifying database password
Thankyou to everyone who responded to my last post (I can't find the posting, it has been buried). <

Legal Issues for SAP ERP o ERP in general
Hi experts,

Can someone please help me finding some documentation about legal issues tha

Call Screen statement Error
Dear Experts,

is there any setting that needs to be done before creating any dialog progr

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