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

How do I send data using an html link
Hi

If I have
<a href="main_file.php">

How do I send data t

My query is being run with no results.
I have this.

Code: function DropUser($duser_id, $user_email, $user_username) {

frame help
on the bottom frame is menu.html

Code: <body><form action='link.php' met

Conditions of info record - Error
When i created GR (901) and PO create automatic my PBXX is obtain the net price of info record but

get multiple rows
Hi I want to get multiple rows from a db

I am using this for the db query
Code: public

This must be easy , pulling the last record of the day, every day, from a txt
I have a txt file logging weather data every minutes (so 1 record per minute). I want to extract the

data type in column definition
Hi,
I create a table with column called "Direction of Travel code ".
The travel codes in t

Firewall / visited websites logger
Hi. I have a firewall implementation and I want to log all the websites visited on the machine. S

Multi Dimensional Array Append
Hi Guys

I have a function that returns a multidimentional array eg

$result = functio

how to populate a drop down box
Hi buddies!

PROCEDURE DOWNLOAD_REPORT_FORM (report_name varchar) is begin DOWNLO

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