我想重定向到一个使用外部js文件的控制器,以便我的url地址栏看起来像[这不是链接](http:/project/index.php/TravellerController/create/1 ) 我在JavaScript代码如下所示:php codeigniter uri
u55.style.cursor = 'pointer';
$axure.eventManager.click('u55', function(e) {
if (true) {
self.location.href=$axure.globalVariableProvider.getLinkUrl('TravellerController');
}
});
的U55是我的“家”的意见链路标识符文件 我TravellerController看起来是这样的:
<?php
class TravellerController extends CI_Controller {
public function index()
{
$data=$this->get_data();
}
function get_data(){
*some code...*
redirect('TravellerController/create/'.$data);
{
function create(){
*some code...*
}
}
?>
所以,如果我点击该链接我的网址地址字段,然后看起来像这样:
[这不是一个链接](HTTP:/project/index.php/home/create/TravellerController)
但我想它看起来像这样:
[这不是一个链接](http:/project/index.php/TravellerController/create/1)
换句话说,即使在不同的用户登录时,它也只能得到相同的一行数据 – 2013-05-07 13:15:21