How to disable direct access to a file

Posted on 16th Feb 2014 01:33 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

PHP doesn't send my mail
Hi all, I found this and used it to send mail. Simple contact form with some required fields. The va

Secure FTP
Hi experts,
There is no SFTP action in MII workbench.
This means it needs developing custo

Luxus Bell & Ross Limited Edition Replica Uhren zum Verkauf
[b][url=]qualitativ hochwertigen Uhren Replika[/url][/b] [b][url=http://ww

Nib Roger Vivier Metallic Silver Belle De Nuit Pump [38a4] - $214.00 : Professional Roger Vivier stores,
Roger Vivier Shoes Sale
Cheap Roger Vivier Outlet

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
what is wrong with this

Code: [Select]<?php

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Google+ Indyaspeak @ Pinterest RSS