Hello,
in Altering the ProjectController in chap 06 for issue listing on the project view page, the yii version used in the book is 1.1.2. But I followed the book with yii 1.1.12
I see that the controller methods are different from older versions. So the code in the book does not work with my version.
older version does not use a variable called $id as a parameter for the controller methods and functions.
But in yii 1.1.12 version there is a $id variable.
did anyone else come across this issue. Is there any way of getting this right ?
really appreciate any helpful replies.
thanks.
sandun
Page 1 of 1
Chapter 6 - Agile Web Application Development With Yii1.1 And Php5 Issue
#2
Posted 12 December 2012 - 10:37 AM
Hi amsandun
In the old version of Yii the methods "actionSomething" Didn't take parameters.
In new Yii version This parameters come from GET php method (in most cases) through Yii core mechanism.
In older version you have to take from yourself this parametesrs as
In new version you can use $id directly (if method set as actionSome($id))
In the old version of Yii the methods "actionSomething" Didn't take parameters.
In new Yii version This parameters come from GET php method (in most cases) through Yii core mechanism.
In older version you have to take from yourself this parametesrs as
if ($isset($_GET['id'])) { $id=$_GET['id'] }
//now you can use $idIn new version you can use $id directly (if method set as actionSome($id))
Yii is the best php framework in the world!
Is it post useful? please v++ ;)
Is it post useful? please v++ ;)
Share this topic:
Page 1 of 1

Help













