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

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

need a script for 3 pages
I have a customer who wants me to set up a site with a number of pages with the following requiremen

Easy administration on MySQL databases
My website is database driven and I am very tired of manually making queries to my tables in order t

help with email script...
hey

I need help with my mail script

when the form on http://www.mcgdesignstudio.com/c

Google voice
I currently have a form in html, but I want it in php so the information is not in the source code.<

Strange Oracle Query problem
Ok So I have this PHP class that talks to a Javascript class that basically creates a table of infor

Format String help
I have a textbox where a person enters an application number. the application number is 10 characte

utl_file open error
i have file in the unix path

Path /popdev01/pop/popdevb/tfi/

File name

firefox wouldnt stream mp3 files completely from my php page
hi everyone,
I have a php file trying to read and stream mp3 files. It works fine in IE but my pr

Inserting multiple records from single form
I've found a number of threads that deal with this issue, but I'm new to php and coding language so

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