tags:

views:

117

answers:

1

Hello everyone,

Does anyone know how can I get the path and URL of the Joomla installation relative to the document root and site domain? I am looking for the Wordpress correspondent of WP_CONTENT_DIR and WP_CONTENT_URL.

Thanks all, Bogdan

I managed to find that part of the URL using this piece of code: $installation_dir_in_url = substr(str_replace(DS, '/', JPATH_SITE), strlen($_SERVER['DOCUMENT_ROOT']));

+1  A: 

Is this what you need:

 JURI::base()

Also check this Joomla documentations out http://docs.joomla.org/JURI

Martin
Actually I was looking for `JURI::root(true)`, but your answer did help a lot.
bogdanvursu
Cool, well glad to be of help.
Martin