Voodoo\Core\Env::getApplicationBaseDir PHP 메소드

getApplicationBaseDir() 공개 정적인 메소드

Get the running application's base dir, usually the root where index.php is being run
public static getApplicationBaseDir ( ) : string
리턴 string
    public static function getApplicationBaseDir()
    {
        return str_replace("\\", "/", pathinfo($_SERVER["SCRIPT_NAME"], PATHINFO_DIRNAME));
    }

Usage Example

예제 #1
0
 /**
  * Return the root dir relative to the Application dir
  * Use it to include files, or get relative path of file
  * @return string
  */
 public function getBaseDir()
 {
     return Env::getApplicationBaseDir();
 }