规范文件

This commit is contained in:
thinkphp
2015-02-21 17:32:41 +08:00
parent 9346bda0f0
commit 1a4a102b49
11 changed files with 32 additions and 70 deletions

View File

@@ -161,7 +161,7 @@ class SecacheClient{
if(!file_exists($this->_file)){
$this->create();
}else{
$this->_rs = fopen($this->_file,'rb+') or $this->trigger_error('Can\'t open the cachefile: '.realpath($this->_file),E_USER_ERROR);
$this->_rs = fopen($this->_file,'rb+') || $this->trigger_error('Can\'t open the cachefile: '.realpath($this->_file),E_USER_ERROR);
$this->_seek($this->header_padding);
$info = unpack('V1max_size/a*ver',fread($this->_rs,$this->info_size));
if($info['ver']!=$this->ver){
@@ -178,7 +178,7 @@ class SecacheClient{
}
function create(){
$this->_rs = fopen($this->_file,'wb+') or $this->trigger_error('Can\'t open the cachefile: '.realpath($this->_file),E_USER_ERROR);;
$this->_rs = fopen($this->_file,'wb+') || $this->trigger_error('Can\'t open the cachefile: '.realpath($this->_file),E_USER_ERROR);;
fseek($this->_rs,0);
fputs($this->_rs,'<'.'?php exit()?'.'>');
return $this->_format();