How do you organize your template structure in CodeIgniter?

后端 未结 3 1423
野趣味
野趣味 2021-02-06 04:44

I will be building a CMS for my final Web Development course project, and i\'ve been challenged by my teacher creating it in an MVC system, and for now, I\'ll be using CodeIgnit

3条回答
  •  孤城傲影
    2021-02-06 04:56

    I am totally agreed with web-johnny file folder structure but in my opinion he missed one thing define all your assets path in ./application/config/constants.php file e.g.

    define('IMAGES_PATH', your_absolute_path_of_images_folder);
    define('CSS_PATH', your_absolute_path_of_css_folder);
    define('SCRIPTS_PATH', your_absolute_path_of_scripts_folder);
    

    and so on... use these constants throughout the application so in this way if you ever need to change your file folder structure you just need to change the values of these constants.

提交回复
热议问题