Welcome Guest, Not a member yet? Register   Sign In
$this->load->view unexpected behavior.
#1

[eluser]cdmn[/eluser]
I did a little test to check my theory.

What i did:
1. Created a view in subfolder: view/subfolder/test_view.php
2. Created another view in sub/subfolder: view/subfolder/_subfolder/inc_view.php
3. Created controller to call test_view.php view
4. Edited Loader library to echo view $path

test_view.php code:

Code:
<?php

echo __FILE__;

$this->load->view('_subfolder/inc_view');

?>

I get:
Quote:/home/user/public_html/system/application/views/subfolder/test_view.php
/home/user/public_html/system/application/views/_subfolder/test_view.php

As you can see, im right now at "subfolder/test_view.php" and im trying to load view from "_subfolder/", but it searches for a view in a root directory. Shouldn't it be searching at "subfolder" directory as I'm already there?


Messages In This Thread
$this->load->view unexpected behavior. - by El Forum - 09-14-2007, 05:29 AM
$this->load->view unexpected behavior. - by El Forum - 09-14-2007, 08:25 AM
$this->load->view unexpected behavior. - by El Forum - 09-14-2007, 09:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB