I have the following directory structure:
C:\mywebsites
\site_1
\site_2
\site_n
In 'site_2' I have joomla installed, however, I have other folders with resources, php scripts, etc. in one of the 'extra' folders, I have scripts that I'm frequently calling, the trouble comes when I call JURI::base(), it returns the folder in which the script file is, in stead of 'site_2' which I'm expecting.
How can I overcome this simple task?
The root directory is defined in JPATH_BASE
.
It's set in the index.php
in the Joomla front end and in the /administrator using:
define('JPATH_BASE', dirname(__FILE__));
JURI::base()
returns the base request path.