src/Leevel/Kernel/Runtime.php
protected function renderWithFile(string $filepath, array $vars = []): string
    {
        if (!is_file($filepath)) {
            throw new Exception(sprintf('Exception file %s is not extis.', $filepath));
        }

        extract($vars);

        ob_start();
        require $filepath;
        $content = ob_get_contents();
        ob_end_clean();

        return $content;
    }
protected function renderWithFile(string $filepath, array $vars = []): string
    {
        if (!is_file($filepath)) {
            throw new Exception(sprintf('Exception file %s is not extis.', $filepath));
        }

        extract($vars);

        ob_start();
        require $filepath;
        $content = ob_get_contents();
        ob_end_clean();

        return $content;
    }
通过模板渲染异常.

@param string $filepath
@param array  $vars

@return string