如何将 post 变量传递给分段 url?我可以从 url 读取它,但我无法设置它......到目前为止我所拥有的:$route['shop/find/(:any)']= "shop/find/$1";
在路线上,我的 find.php 在视图上,以及我的功能`
function find()
{
$this->load->model('shopFront/find');
$this->load->model('currency');
$this->load->model('shopFront/calculate');
$this->load->model('shop/proccess');
$data = $this->commondatashop->general();
$inputSlug = $this->input->post('findSlug');
$data['tofind'] = $inputSlug;
$data['cartInfo'] = $this->shopcart;
$data['Currency'] = $this->currency;
$data['Calculate'] = $this->calculate;
$data['Proccess'] = $this->proccess;
$data['title'] = "1.4.U Shop | Find";
$finder = $this->find;
$data['finderservice'] = $finder;
$data['user_id'] = $this->session->userdata('user_id');
$data['user_name'] = $this->session->userdata('user_name');
$this->load->view('shop/top/topNew',$data);
$this->load->view('shop/content/find',$data);
//footer
$curravailable = $this->calculate->getCurrencies();
if ( $curravailable !== false )
{
$data['currencies'] = $curravailable;
}
else
{
$data['currencies'] = 'none';
}
$this->load->view('shop/footer',$data);
}`
如何将变量发布到带有 url 段的 find() 函数?