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

Simultaneous select/update/insert
Hi

How would I need to go about when 2 users update a single row simultaneous? And how would

Form submissing with PHP and JQuery/Ajax
I have searched everywhere, but cannot find a solution for this... I have worked all day trying to g

Form File Upload
I've read through tons of resources and tutorials and as far as I can tell, my code is accurate, but

How to convert this array to string
I am having problems converting this array to a string
using print_r($val[1]); I get:
Code: [

How to separate records and ORDER BY
Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and

array_count_values question?
ok i'm trying to create a top ten list from a database of listed favorite movies.

the followi

Giving the below syntax error
Dear Experts,

I have used 2 buttons in gui status as display and cjhange.When the user wi

php call servlet
I have done a php backup application .
So there is a form that user pick some files to zip and d

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

php title problem
Hi,

I am having a problem managing my page title with PHP.

Currently I have my <

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