/home/tigerovi/public_html/protected/controllers/front/SiteController.php(766)
754 } 755 } 756 } 757 758 echo 'fail'; 759 die(); 760 } 761 762 public function actionDownloadFile() { 763 if (!empty($_GET['id'])) { 764 $idProducoto = (int) $_GET['id']; 765 $producto = CMSClass::getContenido($idProducoto); 766 $ficha = $producto->getImagenes('P'); 767 768 if (!empty($ficha)) { 769 $path = YiiBase::getPathOfAlias('webroot') . '/upload/' . $ficha[0]->archivo; 770 771 if (!empty($path) && file_exists($path)) { 772 header('Content-Description: File Transfer'); 773 header('Content-Type: application/octet-stream'); 774 header('Content-Disposition: attachment; filename=' . basename($path)); 775 header('Content-Transfer-Encoding: binary'); 776 header('Expires: 0'); 777 header('Cache-Control: must-revalidate'); 778 header('Pragma: public');
#0 |
+
–
/home/tigerovi/public_html/framework/web/actions/CInlineAction.php(50): SiteController->actionDownloadFile() 45 $controller=$this->getController(); 46 $method=new ReflectionMethod($controller, $methodName); 47 if($method->getNumberOfParameters()>0) 48 return $this->runWithParamsInternal($controller, $method, $params); 49 else 50 return $controller->$methodName(); 51 } 52 53 } |
#1 |
+
–
/home/tigerovi/public_html/framework/web/CController.php(309): CInlineAction->runWithParams(array("id" => "252")) 304 { 305 $priorAction=$this->_action; 306 $this->_action=$action; 307 if($this->beforeAction($action)) 308 { 309 if($action->runWithParams($this->getActionParams())===false) 310 $this->invalidActionParams($action); 311 else 312 $this->afterAction($action); 313 } 314 $this->_action=$priorAction; |
#2 |
+
–
/home/tigerovi/public_html/framework/web/CController.php(287): CController->runAction(CInlineAction) 282 * @see runAction 283 */ 284 public function runActionWithFilters($action,$filters) 285 { 286 if(empty($filters)) 287 $this->runAction($action); 288 else 289 { 290 $priorAction=$this->_action; 291 $this->_action=$action; 292 CFilterChain::create($this,$action,$filters)->run(); |
#3 |
+
–
/home/tigerovi/public_html/framework/web/CController.php(266): CController->runActionWithFilters(CInlineAction, array()) 261 { 262 if(($parent=$this->getModule())===null) 263 $parent=Yii::app(); 264 if($parent->beforeControllerAction($this,$action)) 265 { 266 $this->runActionWithFilters($action,$this->filters()); 267 $parent->afterControllerAction($this,$action); 268 } 269 } 270 else 271 $this->missingAction($actionID); |
#4 |
+
–
/home/tigerovi/public_html/framework/web/CWebApplication.php(283): CController->run("downloadFile") 278 { 279 list($controller,$actionID)=$ca; 280 $oldController=$this->_controller; 281 $this->_controller=$controller; 282 $controller->init(); 283 $controller->run($actionID); 284 $this->_controller=$oldController; 285 } 286 else 287 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 288 array('{route}'=>$route===''?$this->defaultController:$route))); |
#5 |
+
–
/home/tigerovi/public_html/framework/web/CWebApplication.php(142): CWebApplication->runController("site/downloadFile") 137 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 138 $_GET[$name]=$value; 139 } 140 else 141 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 142 $this->runController($route); 143 } 144 145 /** 146 * Registers the core application components. 147 * This method overrides the parent implementation by registering additional core components. |
#6 |
+
–
/home/tigerovi/public_html/framework/base/CApplication.php(162): CWebApplication->processRequest() 157 */ 158 public function run() 159 { 160 if($this->hasEventHandler('onBeginRequest')) 161 $this->onBeginRequest(new CEvent($this)); 162 $this->processRequest(); 163 if($this->hasEventHandler('onEndRequest')) 164 $this->onEndRequest(new CEvent($this)); 165 } 166 167 /** |
#7 |
+
–
/home/tigerovi/public_html/protected/components/WebApplicationEndBehavior.php(24): CApplication->run() 19 // Attach the changeModulePaths event handler 20 // and raise it. 21 $this->onModuleCreate = array($this, 'changeModulePaths'); 22 $this->onModuleCreate(new CEvent($this->owner)); 23 24 $this->owner->run(); // Run application. 25 } 26 27 // This event should be raised when CWebApplication 28 // or CWebModule instances are being initialized. 29 public function onModuleCreate($event) { |
#8 |
+
–
/home/tigerovi/public_html/framework/base/CComponent.php(261): WebApplicationEndBehavior->runEnd("front") 256 if($this->_m!==null) 257 { 258 foreach($this->_m as $object) 259 { 260 if($object->getEnabled() && method_exists($object,$name)) 261 return call_user_func_array(array($object,$name),$parameters); 262 } 263 } 264 if(class_exists('Closure', false) && $this->canGetProperty($name) && $this->$name instanceof Closure) 265 return call_user_func_array($this->$name, $parameters); 266 throw new CException(Yii::t('yii','{class} and its behaviors do not have a method or closure named "{name}".', |
#9 |
+
–
/home/tigerovi/public_html/index.php(15): CComponent->__call("runEnd", array("front")) 10 defined('YII_DEBUG') or define('YII_DEBUG', true); 11 // specify how many levels of call stack should be shown in each log message 12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3); 13 14 require_once($yii); 15 Yii::createWebApplication($config)->runEnd('front'); |