PPT


posted by Jadhav on Mon Apr 08, 2019 03:25 am

#1

CException

Property "CUploadedFile.image" is not defined.

/home1/niftypun/public_html/protected/controllers/SiteController.php(166)

154     public function actionImageupload() {
155         $model = CUploadedFile::getInstanceByName('file');
156 
157         if ($model) {
158             $extnarr = explode('.', $model);
159             $extn = end($extnarr);
160             $ext_chk = strtolower($extn);
161             if ($ext_chk == 'jpg' || $ext_chk == 'jpeg' || $ext_chk == 'png' || $ext_chk == 'gif') {
162                 $image_name = time() . '.' . $extn;
163                 $model->saveAs(Yii::app()->basePath . '/../uploads/' . $image_name);
164                 echo CHtml::image('/uploads/' . $image_name);
165             } else {
166                 $model->image = '';
167             }
168         }
169         Yii::app()->end();
170     }
171 
172     public function actionchatroom1() {
173         $this->layout = 'home';
174         $user = User::model()->getUserById($this->user_id);
175         if ($user['user_type'] == 'unverified') {
176             Yii::app()->user->setFlash('error', 'You are not a verified member. Please fill verification form.');
177             $this->redirect($this->link->getProfileLink());
178         }

Stack Trace

#0
+
 /home1/niftypun/public_html/protected/controllers/SiteController.php(166): CComponent->__set("image", "")
161             if ($ext_chk == 'jpg' || $ext_chk == 'jpeg' || $ext_chk == 'png' || $ext_chk == 'gif') {
162                 $image_name = time() . '.' . $extn;
163                 $model->saveAs(Yii::app()->basePath . '/../uploads/' . $image_name);
164                 echo CHtml::image('/uploads/' . $image_name);
165             } else {
166                 $model->image = '';
167             }
168         }
169         Yii::app()->end();
170     }
171 
#8
+
 /home1/niftypun/public_html/index.php(15): CApplication->run()
10 // specify how many levels of call stack should be shown in each log message
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
12 
13 require_once($yii);
14 date_default_timezone_set('Asia/Kolkata');
15 Yii::createWebApplication($config)->run();
2019-04-08 08:49:52 Apache/2.4.39 (cPanel) OpenSSL/1.0.2r mod_bwlimited/1.4 Phusion_Passenger/5.3.7 Yii Framework/1.1.12


© TA.TEAM 2019. ALL RIGHTS RESERVED