0 votes
in CodeIgniter by
How can you load a view in CodeIgniter?

1 Answer

0 votes
by

Creating a View

Using your text editor, create a file called blogview.php, and put this in it:

<html>
<head>
        <title>My Blog</title>
</head>
<body>
        <h1>Welcome to my Blog!</h1>
</body>
</html>

Then save the file in your application/views/ directory.

Loading a View

To load a particular view file you will use the following method:

$this->load->view('name');

Where name is the name of your view file.

Related questions

0 votes
asked Dec 29, 2020 in CodeIgniter by SakshiSharma
0 votes
asked Dec 27, 2020 in CodeIgniter by SakshiSharma
...