我有一段代码
$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/URL/index.php/create
但我希望它只是
http://localhost/xxxx/index.php/create
答案 0 :(得分:0)
我想你可以试试这个:
echo $this->base_url().'create';
上面的代码将输出:
http://localhost/index.php/create