This is how the directory structure looks like in my codeigniter installation.
Root
-www
-lib
--application
--assets
---js
I am looking to get path of a controller in the javascript file located at js folder. How can I do that ?
Edit: I need the path to the php script for an Ajax call.
base_url("controller/method")like @Rejoanul suggested. Have you tried that?site_url()instead ofbase_url(). does not need link main controller just usesite_url('controller/method')it will work