1.2.794. No Direct Access

This expression protects files against direct access. It will kill the process if it realizes this is not supposed to be directly accessed.

Those expressions are used in applications and framework, to prevent direct access to definition files.

<?php

  // CONSTANT_EXEC is defined in the main file of the application
  defined('CONSTANT_EXEC') or die('Access not allowed'); : Constant used!

?>

1.2.794.1. Specs

Short name

Structures/NoDirectAccess

Rulesets

All, Appinfo, CE

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Available in

Entreprise Edition, Community Edition, Exakat Cloud