[eluser]nvhack[/eluser]
I have been familiarizing myself with CI this week and making progress. But I can't seem to figure out why a few things happen with the views.
Here is my structure:
htdocs/ci/
htdocs/ci/images/tpl/
htdocs/ci/system/application/views/
My config is set to $config[’base_url’] = “http://localhost/ci/”;
This is running on XAMPP - no .htaccess files but Mod_rewrite is enabled.
I constructed a simple header view the with a css link and a image link. and load that view immediately before the view for the content like so
Code:
$data['page_title'] = 'Test page';
$data['page_header'] = 'Page title';
$this->load->view('header', $data);
$this->load->view('content', $data);
Here's whats happening.
If I view the page like this with the trailing slash all is groovey
Code:
http://localhost/CI/index.php/admin/
If I view the page without the trailing slash like this
Code:
http://localhost/CI/index.php/admin
the view loads but does not load the CSS or the image. A look at the browser source shows that the paths to the css and image are identical.
This occurs in Firefox and IE and in other views.
I'm stumped. Why is this happening here?
Another odd behavior
Dream weaver wants to traverse 3 levels up to the image/css links
../../../images/
which is correct since we have to go 3 levels up views\application\system. CI want the path to go only 2 levels up
../../images/
Why is that???
Anyone have a clue?