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

Glib GIOChannel -

delphi - When I encode/decode SMS PDU (GSM 7 Bit) user data, do I need prepend the UDH first? -

python - Obscure curses error message when creating a sub window -