As mentioned earlier, the CI PHP view file can access any of the CI resources, such as calling the CI helpers, libraries, or models in the same way the controller does.
The following is a more elaborated and complete example of a PHP CI view file, accessing CI resources, such as libraries/models/helpers:
<HTML> <?PHP // URI is a built-in CI library // if the rendering controller for this view was// http://mysite/myproject/mycontroller/test3 // the segment(1) = mycontroller – the controller name // the segment(2) = test3 - the controller method $the_controller = $this->uri->segment(1); $the_method = $this->uri->segment(2); ?> <H1>This View Rendered by Controller <?=$the_controller; ?> </H1> <H1>Using its method named <?=$the_method; ?></H1>