php - Parameter after url is not passed to called function when Parameter contains : or \ -


i passing keyword inputed user function search_result($input) in cakephp fron javascript www.example.com/search_result/input javascript input user gives error when input contains : no arguments found search_result. working fine other inputs.

you want encode search term before passing php javascript (which assume means you're using ajax).

you can using:encodeuricomponent:

encodeuricomponent(term); 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -