Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Base url in joomla module

Tags:

url

joomla

Evening,

I've implented some AJAX functions in a Joomla module. Now when I activate SEF, the AJAX is not working anymore. This is because the path to the external php file is changed..To fix this I need to add the base url, now the question is: how to get the base url in the following:

remote: "modules/mod_module/libs/elements/db_checker.php"

so it should be something like

remote: "<?php echo $baseurl; ?>modules/mod_module/libs/elements/db_checker.php"

so the full link should become

remote: "http://www.mysite.com/modules/mod_module/libs/elements/db_checker.php"

I cant get URI to work, please assist me with this

Thanks in advance

UPDATE

fixed it myself:) this is the fix:

<?php echo JURI::root().'modules/mod_module/libs/elements/db_checker.php'; ?>
like image 997
Maarten Hartman Avatar asked May 08 '12 20:05

Maarten Hartman


1 Answers

fixed it myself:) this is the fix:

<?php echo JURI::root().'modules/mod_module/libs/elements/db_checker.php'; ?>
like image 57
Maarten Hartman Avatar answered Sep 28 '22 01:09

Maarten Hartman