How do I check if the request is made via AJAX in CodeIgniter?

前端 未结 7 2071
余生分开走
余生分开走 2020-11-28 08:29

How do I check if the request is an AJAX? I am using CodeIgniter. I have a link that when it clicked, it\'ll open the pop-up dialog window this is done through ajax it reque

7条回答
  •  臣服心动
    2020-11-28 09:17

    Instead of detecting whether your request was an ajax request or not(Which can be any HTTP verb - GET/POST/HEAD) you may wanna try and add/modify routes to your routes.php for specifically handling these scenarios.

提交回复
热议问题