下面这段代码运行时报错:Warning: fread(): supplied argument is not a valid stream resource in E:\PHPnow-1.5.6\htdocs\source\core\library\class.cache.php on line 162Warning: fclose(): supplied argument is not a valid stream resource in E:\PHPnow-1.5.6\htdocs\source\core\library\class.cache.php on line 163代码如下:
public function readDcache( $cacheName, $serialize = 1 )
{
$cache_data = NULL;

$cachefile = BASE_ROOT."./data/cache/".$cacheName.".cache";

if ( is_file( $cachefile ) && !( filesize( $cachefile ) <= 0 ) || ( $fp = fopen( $cachefile, "r" ) ) )
{
$data = fread( $fp, filesize( $cachefile ) );
fclose( $fp );

if ( $serialize == 1 )
{
$cache_data = $this->_unSerialize( $data );
return $cache_data;
}
$cache_data = $data;
}
return $cache_data;
}
162行和163行代码是:$data = fread( $fp, filesize( $cachefile ) );
fclose( $fp );怎样修改?