Category Covered

How to get the joomla base url

You can get joomla url by using the following variable.

1.$mosConfig_live_site

it will return  “http://www.myurl.com”.

You can also use it in joomla 1.5 ++

2.  echo 'Joomla base URI is ' . JURI::base() . "\n";
echo 'Joomla base URI (path only) is ' . JURI::base( true ) . "\n";

Joomla base URI is http://localhost/myjoomla/
Joomla base URI (path only) is /myjoomla
joomla website

 
Posts you may like
 
Top 15 Posts
Google+