forum > Is inside web app?

  • Is way to detect type of app running mode (neko/php): inside web server environment or not (from the command line)?

  • Now I find next solution:

    public static function isCli() : Bool
    {
        #if php
        return untyped __php__("PHP_SAPI == 'cli'");
        #elseif neko
        return !neko.Web.isModNeko && !neko.Web.isTora;
        #end
    }

< Prev | Page 1 / 1 | Next >