Tip: getting the path of the project at runtime

Hi,

Fiddling around with the generated code I found the following to get the path of the project at runtime.


$projectpath = $this->Ini->root . $this->Ini->path_link

If you want to know the name of the application running use


$this->Ini->nm_cod_apl;

and the name of the project itself should you wish


$this->Ini->nm_grupo;

A lot of stuff can be found in the generated index.php file of the application.

Cheers,
Sparrow

This can be of help too:

$app = new logonform_ini();
$app->init();
echo 'Projectversion: '.$app->nm_app_version;
echo ‘Project name:’.$app->nm_grupo;

If anyone stumles upon this in more recent years, It still works as of version 9.4 (August 2019)

This one I use all the time for the document path.
$file = ($this->Ini->path_doc . “/yourdoc.doc”);