Php 如何修复codeigniter定向url?
我有一段代码Php 如何修复codeigniter定向url?,php,codeigniter,url,Php,Codeigniter,Url,我有一段代码 $data = array( 'class'=>"btn btn-primary btn-lg", 'id' => "btnSearch", 'role'=> "button", ); echo anchor("create",'<span class="glyphicon glyphicon-search"></span>Search',$d
$data = array(
'class'=>"btn btn-primary btn-lg",
'id' => "btnSearch",
'role'=> "button",
);
echo anchor("create",'<span class="glyphicon glyphicon-search"></span>Search',$data);
但我希望它是公正的
http://localhost/xxxx/index.php/create
我想你可以试试这个:
echo $this->base_url().'create';
上述代码将输出:
http://localhost/index.php/create
echo $this->base_url().'create';