PHP notice

Undefined variable: file

/var/www/yurey/data/www/fujiyama-trading.ru/protected/modules/autos/views/front/brand/one_brand_model.php(61)

49 
50                  if($baner->model_id == $brand_model->id)
51                     $file=Upload::model()->find('row_id='.$baner->id.' AND category="catalog_baner_img"');
52 
53                     
54                //     var_dump("/img/2.100.100.0.2.2.95/autos/".);
55                   //  die();
56 
57                 }
58     
59     
60     ?>
61     <img itemprop="image" src="/img/2.225.155.0.2.2.95/autos/<?=$file['name']?>" alt="<?=$brand->name?> <?=$brand_model->name?>" style=" margin: 0 20px 10px 0; float: left;" />
62     
63     
64     <?
65     
66     
67     
68  $BRAND_MODEL_TEXT_FILE=$_SERVER['DOCUMENT_ROOT'].'/texts/models/'.strtolower($brand->name).'/'.strtolower($brand->name).'-'.strtolower($brand_model->name).'.html';
69  
70 if(file_exists($BRAND_MODEL_TEXT_FILE)){
71    echo file_get_contents($BRAND_MODEL_TEXT_FILE);
72 }else{ 
73   echo $brand_model->text;

Stack Trace

#4
+
 /var/www/yurey/data/www/fujiyama-trading.ru/protected/modules/autos/controllers/front/BrandController.php(138): CController->render("one_brand_model", array("brand_model" => BrandModel, "brand" => Brand, "brandModelsAutos" => array(Autos, Autos, Autos)))
133       
134                 $brandModelsAutos = Autos::model()->findAllBySql($sql);
135                 
136         $this->pageTitle = $brand->name.' '.$brandModel->name.'. Заказать из Японии в Fujiyama Trading';
137         
138       $this->render('one_brand_model', array('brand_model'=> $brandModel,'brand'=>$brand,'brandModelsAutos'=>$brandModelsAutos));
139        }
140 
141 }
#19
+
 /var/www/yurey/data/www/fujiyama-trading.ru/protected/components/WebApplicationEndBehavior.php(26): CApplication->run()
21         // Attach the changeModulePaths event handler
22         // and raise it.
23         $this->onModuleCreate = array($this, 'changeModulePaths');
24         $this->onModuleCreate(new CEvent($this->owner));
25  
26         $this->owner->run(); // Run application.
27     }
28  
29     // This event should be raised when CWebApplication
30     // or CWebModule instances are being initialized.
31     public function onModuleCreate($event)
#22
+
 /var/www/yurey/data/www/fujiyama-trading.ru/indexy.php(85): CComponent->__call("runEnd", array("front"))
80 // Remove the following lines when in production mode
81 defined('YII_DEBUG') or define('YII_DEBUG', true);
82 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
83  
84 require_once($yii);
85 Yii::createWebApplication($config)->runEnd('front');
86 
87 
88 
89 
90 ?>
2024-03-29 10:38:45 Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 Yii Framework/1.1.12