faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 10 people (50%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

Block direct access

Nov 28th, 2008 11:23
healthy man, Matthew Wilkinson, Thomas Anderson,


if (eregi($pagename, $PHP_SELF)) {
  die ("You can't access this file directly...");
}
$pagename must be the name of the file, not the path.
eg. $pathname = "nodirectaccess.php";
http://www.healthbyhealth.com
http://www.healthment.com
http://www.mesotheliomadown.com
http://www.mesotheliomaout.com
http://www.pickarticle.com