think\template\driver\File::write PHP Метод

write() публичный Метод

写入编译缓存
public write ( string $cacheFile, string $content ) : void | array
$cacheFile string 缓存的文件名
$content string 缓存的内容
Результат void | array
    public function write($cacheFile, $content)
    {
        // 检测模板目录
        $dir = dirname($cacheFile);
        if (!is_dir($dir)) {
            mkdir($dir, 0755, true);
        }
        // 生成模板缓存文件
        if (false === file_put_contents($cacheFile, $content)) {
            throw new Exception('cache write error:' . $cacheFile, 11602);
        }
    }