[ _LIB ] Global Variables to get folder Directorys

Hello,

Does scriptcase has some global variables to get folders directorys?
I wanted a function that would return _lib folder directory… “c:/(…)/nameofproject/_lib”

I found this $_SERVER[‘DOCUMENT_ROOT’] it returns “C:/Program Files (x86)/NetMake/v8/wwwroot”
But i still need to get the name of project, i dont want to write a static name in code for this…

Best Regards,
V?tor Pereira

Normally …/_lib do the job

yeah, but the _lib in development is diferent on production version, there isnt a dinamic function like GetLibDir() that allways return the correct directory?

here is what you need.

echo $this->Ini->path_lib_php;

Regards.

i did var_dump($this); to find the directory i wanted from this

[QUOTE=kafecadm;38872]here is what you need.

echo $this->Ini->path_lib_php;

Regards.[/QUOTE]

and i found it!
echo $this->Ini->path_doc;
It returns allways the directory i want with the same line of code :3
Development:
C:/Program Files (x86)/NetMake/v8/wwwroot/scriptcase/file/doc

Production: (Linux)
/var/www/project_name/_lib/file/doc

Best Regards and Thanks,
V?tor Pereira

I will share how to access image file directory you can do this,

echo $_SERVER[‘DOCUMENT_ROOT’].$this->Ini->path_imagens;

Development:
C:/Program Files (x86)/NetMake/v8/wwwroot/scriptcase/file/img

Production: (Linux)
/var/www/project_name/_lib/file/img

Clean code :slight_smile:

Best Regards,
V?tor Pereira

1 Like

Thanks for share