How to change the extension in view using codeigniter 3?

僤鯓⒐⒋嵵緔 提交于 2019-12-07 15:32:29

You don't need to change extension to html, you can use html in a php file, just don't open php tag.

EDIT :

If you really have to change the ext, just do :

$this->load->view('welcome_message.html'); 

You can try to change it using route configuration in application/config/routes.php

Then, you can use:

$route['[your controller]/welcome_message'] = '[your controller]/welcome_message.html';

For for information about routes, you can check official documentarion here:

http://www.codeigniter.com/user_guide/general/routing.html

Or you can use Static pages:

http://www.codeigniter.com/user_guide/tutorial/static_pages.html

Regards.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!