Yii Framework Forum: controller redirect and foward? [solved] - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

controller redirect and foward? [solved] Rate Topic: -----

#1 User is offline   resplendent 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 22-May 09
  • Location:Singapore

Posted 14 May 2010 - 04:25 AM

Hi,

I trying out CGridView widget in my application. When user click on view icon, it will be directed to the controller, where I then redirect them to other pages depending on their id. Why is it that CController->redirect prompted error and CController->forward do works?

Btw I've got header cannot be modified error. The problem is I backtrack, I haven't render or echo anything before the redirect.
0

#2 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 14 May 2010 - 05:01 AM

If you tell us more about the error, maybe we could help...

Also check your files for spaces before <?php on top.
0

#3 User is offline   resplendent 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 22-May 09
  • Location:Singapore

Posted 16 May 2010 - 09:21 PM

Thanks Mike! You're right. I save the php file in a wrong format. I save it as UTF-8 when I am required to save as UTF-8 without BOM.
0

#4 User is offline   fastcrash 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 245
  • Joined: 10-March 10
  • Location:South Jakarta

Posted 16 May 2010 - 10:38 PM

i think i have the same problem,
how can we redirect to the last page in cgridview(admin) after create/update some record?
please show me the code.

regards. :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users