Php codeigniter:Passing empty arguments through redirect -


here controller function

class customer extends ci_controller{   public function view($page='customer-new-bill',$param=null,$type='normal')   {    } } 

sometimes don't want have value $param argument empty second parameter using way in redirect

redirect('customer/view/customer-view-invoice//invoice'); 

but didn't worked.

i want pass empty parameters through redirect possible?

note:

i used method $this->view('','','invoice') worked need redirect

if want send null parameters send @ end

class customer extends ci_controller{     public function view($page='customer-new-bill',$type='normal', $param=null)    {     }  } 

and use route

$route['customer/view/(.*)'] = "customer/view/$1/$2"; 

the route (.*) work unlimited perimeters.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -