 <p><em>Which CodeIgniter version are you running?</em></p> <p>If CodeIgniter 2.*. Try looking at this page: <a href="https://ellislab.com/codeigniter/user-guide/general/views.html" rel="nofollow">CodeIgniter Guides - Views</a></p> <p>Under <strong>Loading a View</strong> it shows you the code of how to load your ViewMessages.php inside your controller</p>