更新核心类库

This commit is contained in:
thinkphp
2015-01-19 11:04:05 +08:00
parent 5f1623aa7d
commit b34b209af4
85 changed files with 1266 additions and 6142 deletions

View File

@@ -10,17 +10,20 @@
// +----------------------------------------------------------------------
namespace Think\Template\Driver;
use Think\Exception;
class File {
// 写入编译缓存
public function write($cacheFile,$content){
// 检测模板目录
$dir = dirname($cacheFile);
if(!is_dir($dir))
mkdir($dir,0755,true);
if(!is_dir($dir)){
mkdir($dir,0777,true);
}
// 生成模板缓存文件
if( false === file_put_contents($cacheFile,$content))
E('_CACHE_WRITE_ERROR_:'.$cacheFile);
if( false === file_put_contents($cacheFile,$content)){
throw new Exception('_CACHE_WRITE_ERROR_:'.$cacheFile);
}
}
// 读取编译编译