在脚本'/usr/local/apache2/htdocs/read.php'的第197行发生了错误: 只能传递变量的引用 (第196行是
我正在使用来自http://php.net/manual/en/function.mime-content-type.php的小脚本,但我遇到了一个致命错误,我似乎无法解决。有没有人有相关经验可以给我指点迷津?
$ext = strtolower(array_pop(explode('.',$filename)));
)。if(!function_exists('mime_content_type')) {
function mime_content_type($filename) {
$mime_types = array(
'txt' => 'text/plain',
'htm' => 'text/html',
'html' => 'text/html', //ETC
);
$ext = strtolower(array_pop(explode('.',$filename)));
if (array_key_exists($ext, $mime_types)) {
return $mime_types[$ext];
}
elseif (function_exists('finfo_open')) {
$finfo = finfo_open(FILEINFO_MIME);
$mimetype = finfo_file($finfo, $filename);
finfo_close($finfo);
return $mimetype;
}
else {
return 'application/octet-stream';
}
}
}
我正在使用来自http://php.net/manual/en/function.mime-content-type.php的小脚本,但我遇到了一个致命错误,我似乎无法解决。有没有人有相关经验可以给我指点迷津?