My webapp has a buch of modules. Each module has a \'main\' php script which loads submodules based on a query sent to the main module:
//file: clientes.php
You can define('SOMETHING', null) in clientes.php and then check if (!defined('SOMETHING')) die; in the modules.
define('SOMETHING', null)
if (!defined('SOMETHING')) die;