Announcement

Collapse
No announcement yet.

Application Name as variable

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Application Name as variable

    Is there any build in variable in SC that holds currently open Application Name - so I can read it/display it ?

    Arthur

  • #2
    See my other post. I don't know if it's available but look into the xxxxx_ini procedure to look for the available globals. It's at least possible with php to retrieve the url, which contains the same info of course.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      The current application name can be derived from __FILE__ php magical constant. And __DIR__ is sometimes usefull as well...

      Comment


      • #4
        Be aware of that:
        1. curent_directory !== app_name
        2. curent_directory === friendly_URL
        3. and if not set Friendly URL then curent_directory === app_name
        And of course there is a build in variables contains some project and app info:
        PHP Code:
        // onScriptInit event
        $self $_SERVER['PHP_SELF'];
        echo 
        "Project name : " $this->Ini->nm_grupo .'<br>';
        echo 
        "Project ver. : " $this->Ini->nm_grupo_versao .'<br>';
        echo 
        "Current app  : " $this->Ini->nm_cod_apl .'<br>';
        echo 
        '<br>frendly_name V1: 'basename(dirname($self));
        echo 
        "<br>frendly_name V2: ".basename(pathinfo($selfPATHINFO_DIRNAME));
        echo 
        '<br>called_script : 'basename($self);
        echo 
        '<br>curent_file : 'basename(__FILE__); 
        Last edited by MilanB; 01-29-2017, 08:58 AM.

        Comment

        Working...
        X