phpDocumentor pivotx
[ class tree: pivotx ] [ index: pivotx ] [ all elements ]

Procedural File: lamer_protection.php

Source Location: /lamer_protection.php

Page Details

Adds protection to files.

The protection are for files that, when called directly, execute code, while they shouldn't. It is not intended for files that either do nothing when called directly (just function- or class-definitions), or are meant to be called directly, and therefore have proper checks on the incoming parameters.

Usage: In the file that needs protection add:

  1.  $currentfile basename(__FILE__);
  2.  require dirname(__FILE__)."/lamer_protection.php";

If the file isn't in the same directory as "lamer_protection.php", adjust the path in the require call.


Documentation generated on Tue, 05 Sep 2017 01:06:03 +0200 by phpDocumentor 1.4.3