title: Base url in joomla module
body: <p>Evening,</p>
  
  <p>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:</p>
  
  <pre><code>remote: "modules/mod_module/libs/elements/db_checker.php"
  </code></pre>
  
  <p>so it should be something like</p>
  
  <pre><code>remote: "&lt;?php echo $baseurl; ?&gt;modules/mod_module/libs/elements/db_checker.php"
  </code></pre>
  
  <p>so the full link should become</p>
  
  <pre><code>remote: "http://www.mysite.com/modules/mod_module/libs/elements/db_checker.php"
  </code></pre>
  
  <p>I cant get URI to work, please assist me with this</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>fixed it myself:) this is the fix:</p>
  
  <pre><code>&lt;?php echo JURI::root().'modules/mod_module/libs/elements/db_checker.php'; ?&gt;
  </code></pre>