This is probably so simple but I haven’t been able to work it out in the last few hours
So here’s what I’m trying to do I have a URL where id like to pass a id in to
eg www.somedomain.com/test/index.php/random/12
Now with the following code i can get the "random" part of the URL but cant work out how to get the "12" part of the URL
<?php
class randomController extends Controller
{
public function actionIndex()
{
$this->render('index');
}
public function actionView()
{
$this->render('view', array('id'=>$this->get));
}
}
?>
A little off-topic note: If register_globals is turned on in PHP configuration then he can also use $id in place of $_GET[‘id’]. But AFAIK there aren’t many people (servers, hostings, admins) that allow of register_globals in PHP this days, due to security manners.