![]() |
[SOLVED]Blueimp's AJAX Chat + CodeIgniter integration - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17) +--- Thread: [SOLVED]Blueimp's AJAX Chat + CodeIgniter integration (/showthread.php?tid=65852) |
[SOLVED]Blueimp's AJAX Chat + CodeIgniter integration - dimawebmaker - 08-01-2016 I have a problem with integration Blueimp's AJAX Chat in my project based on CI framework. In root durectory of my project, I made new folder "chat" and upload inside chat files. After I edit chat /lib/custom.php and write this: PHP Code: define('BASEPATH', AJAX_CHAT_PATH.'../system/'); When I try to go url: http://myproject.com/chat/ it redirect me on auth page. After auth, I cant open http://myproject.com/chat/ it keep redirecting me on other controllers of my project. Here is .htaccess Code: RewriteEngine On So I think after I import this file ../system/core/CodeIgniter.php in chat, it start using route, instead to redirect. I want open this url http://myproject.com/chat/, but can't coz CI think that it is another controller. ====================================== Solution. hi hi I solved this problem, long time ago and just now want to write my solution, maybe it will help someone in future ![]() First need change CI index.php Need make absolute path PHP Code: //$system_path = 'system'; Now in Chat's custom.php add this code PHP Code: ob_start(); Now our auth function in CustomAJAXChat.php will be looks like this: PHP Code: function getValidLoginUserData() { All other parts u can write by urself ![]() RE: Blueimp's AJAX Chat + CodeIgniter integration - InsiteFX - 08-02-2016 Create a Chat controller and run it from there. |