开发者

MVC internal working PHP

开发者 https://www.devze.com 2023-03-26 09:26 出处:网络
I ha开发者_JS百科ve basically the following folder structure: Framework_Folder |__application _Models

I ha开发者_JS百科ve basically the following folder structure:

Framework_Folder
    |__application
    |     |_Models
    |     |_views
    |     |_controllers
    |
    |__config
    |__core
    |     |
    |     |_model.php
    |     |_controller.php
    |     |_bootstrap.php
    |     |_security.php
    |
    |__index.php
    |__.htaccess

I do this way: I redirect all http request to index.php using .htaccess Index.php set up Absolute paths and loads bootstrap.php bootstrap.php loads security (which turns of global register, magic quotes et al) and loads the required controller

I wonder if theoreticall there is something Iam missing or I'm doing wrong before I put to test this design. Also any suggestion of anything to add or remove is appreciated.


I ended up using same structure with little modification to accomodate templates. Else, it is perfect structure, at least for me!

0

精彩评论

暂无评论...
验证码 换一张
取 消