Cakephp DBに保存したファイルへアクセスする。
<?php public function images($id, $name = "image1") { $this -> layout = false; $image = $this -> Product -> findById($id); header('Content-type: image/jpeg'); if (empty($image)) { return; } echo $image['Product'][$name]; }