how to avoid sql injection in codeigniter

前端 未结 6 2006

In CodeIgniter, how can I avoid sql injection? Is there any method to set in config file to avoid sql injection? I am using this code for selecting values:



        
6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 20:11

    You can check if you var contain only letters of numbers, meaning you var mast be in you defined format. before you insert it into the query

提交回复
热议问题