Announcement

Collapse
No announcement yet.

[ _LIB ] Global Variables to get folder Directorys

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

  • [ _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

  • #2
    Normally ../_lib do the job
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


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

      Comment


      • #4
        here is what you need.

        echo $this->Ini->path_lib_php;

        Regards.

        Comment


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

          Originally posted by kafecadm View Post
          here is what you need.

          echo $this->Ini->path_lib_php;

          Regards.
          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

          Comment


          • #6
            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

            Best Regards,
            Vítor Pereira

            Comment


            • #7
              Thanks for share
              /Giuseppe

              Professional Scriptcase Services
              Some Customers opinions

              Comment

              Working...
              X