Welcome Guest, Not a member yet? Register   Sign In
$this->load->view() ???


Means load the view from the views directory called blog. If blogs was in a subdirectory under views such as views/blogs/, then you would need:


Entering the .php file extension is not necessary. CI handles appending the file extension for you using the EXT constant defined in index.php.

$this is the object in scope, load is an alias for the Loader library, and view is a method within the Loader library. Most files in CI are loaded by the Loader library (the notable exception being a Controller). Other examples:


Loader supports loading arrays of files (multiple files) in some cases. In Loader.php, the singular methods load individual files and the plural methods load an array of files.

Read the user guide section about the Loader library. You might want to browse through system/libraries/Loader.php to get an understanding of how Loader loads different file types.

Messages In This Thread
$this->load->view() ??? - by El Forum - 08-23-2007, 08:02 PM
$this->load->view() ??? - by El Forum - 08-24-2007, 02:49 AM
$this->load->view() ??? - by El Forum - 08-24-2007, 02:50 AM
$this->load->view() ??? - by El Forum - 08-24-2007, 02:59 AM
$this->load->view() ??? - by El Forum - 08-30-2007, 06:31 PM
$this->load->view() ??? - by El Forum - 08-31-2007, 03:06 PM

Theme © iAndrew 2016 - Forum software by © MyBB