Доброе утро, ребята.
В error_log CakePHP обвиняет следующее:
28/11/2011 10:13:27 Error: [MissingControllerException] ImagesController Controller class could not be found.
# 0 /........./app/webroot/index.php (96): Dispatcher-> dispatch (Object (CakeRequest), Object (CakeResponse))
# 1 {main}
Я понятия не имею, что это такое, потому что у меня нет ImagesController , но есть ImagesComponent .
Фрагмент кода:
// app/Controller/BrandsController.php
class BrandsController extends AppController {
public $components = array('Image');
...
public function add() {
if ($this->request->is('post')) {
if (!empty($this->request->data)) {
if(!$this->request->data['Image']['name1']['error']) {
$this->Brand->create();
$image_path = $this->Image->uploadImage(
$this->request->data['Image'],
'Brands',
array(
'folder'=>'upload/imagens/marcas',
'resize'=>175,
'thumb'=>0,
'original'=>false,
'name'=>$this->request->data['Brand']['brand']
)
);
// app/Controller/Component/ImageComponent.php
class ImageComponent extends Component {
public $components = array('String');
function uploadImage($images, $controller, $data) {
$erroimg = false;
$isfile = false;
...
В чем причина этой ошибки?
Извините за мой английский