[eluser]stevea[/eluser]
I have the directory structure shown in the attached figure. The
editor.php controller has the line:
Code:
$this->config->load('uploader_settings', TRUE);
But uploader_settings.php is just:
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require('../config.php');
/* End of file uploader_settings.php */
/* Location: ./system/application/config/uploader_settings.php */
My question is, how does
require('../config.php') load the config file? Is CI making some assumptions about relative paths?
If the line in editor.php
Code:
$this->config->load('uploader_settings', TRUE);
is actually including uploader_settings.php in editor.php, then ('../config.php'); would be running from editor.php and
../ would take us to the application directory, but there's no config.php there.
If the config-> load line doesn't actually include uploader_settings.php into editor.php, so require('../config.php') is running from config/uploader_settings.php, then
../ would again take us to the application directory, where there is no config.php file.
Does anyone see how
require('../config.php'); loads config.php? Is CI making its own directory assumptions, or forgiving an error in the code and going to the right place?
Thanks