public static function execScript($script_path, $context=null)
    {
        header('Content-type: text/javascript');
        if(!is_null($context)){
            if(is_object($context)){
                $context = get_object_vars($context);
            }
            if(is_array($context)){
                extract($context);
            }

        }
        require($script_path);
    }
public static function execScript($script_path, $context=null)
    {
        header('Content-type: text/javascript');
        if(!is_null($context)){
            if(is_object($context)){
                $context = get_object_vars($context);
            }
            if(is_array($context)){
                extract($context);
            }

        }
        require($script_path);
    }
public static function execScript ( $ script_path , $ context = null ) { header ( 'Content-type: text/javascript' ) ; if ( ! is_null ( $ context ) ) { if ( is_object ( $ context ) ) { $ context = get_object_vars ( $ context ) ; } if ( is_array ( $ context ) ) { extract ( $ context ) ; } } require ( $ script_path ) ; }
Executes a script at a certain path
@param string $script_path full path
Executes a script at a certain path