使用时出于某种原因
$this->response->send_file($file_to_send, $file->hashed_name.'.'.$file->extension);
我收到这样的错误:
ErrorException [ Warning ]: mime_content_type() [<a href='function.mime-content-type'>function.mime-content-type</a>]: can only process string or stream arguments
SYSPATH/classes/kohana/file.php [52]
47 }
48
49 if (ini_get('mime_magic.magicfile') AND function_exists('mime_content_type'))
50 {
51 // The mime_content_type function is only useful with a magic file
52 return mime_content_type($filename);
53 }
Trace 显示这mime_content_type(arguments)
似乎是bool FALSE
出于某种原因。但是我传递给send_file
正常的字符串完整路径,如/var/www/dev3/media_files/files/113b778d9751e7d1667b300557b6e8030ba1227e68ef9c4dd093a4cd79691f9d.png
.