Simple MVC Framework is a PHP 5.3 MVC Framework. It’s designed to be lightweight and modular, allowing developers to build better and easy to maintain code with PHP.
The base framework comes with a few helper classes, this is to keep code bloat down to a minimum. Classes can easily be added at any stage of development.
Simple MVC Official website:
Lets start with the installation.
For this framework to work, you need:
- Apache or other web server with mod_rewrite enabled
- PHP 5.3 or greater
If you don’t have these, you can check out our tutorial:
1. Download the framework
Open Terminal and go to:
Download the framework:
2. Unzip the framework
You can rename directory with:
mv v2-master simplemvc
Note: This will rename it to simplemvc
3. Set up your routes in index.php
Go to simplemvc directory:
And open index.php with your editor:
4. Configure the framework
Find config.example.php file, it is located under app/core/
- Set your base URL.
- Set your database credentials if you are using database.
- Set the default theme.
Rename config.example.php to config.php
mv config.example.php config.php
5. Edit .htaccess file
If you installed Simple MVC Framework in a folder, you need to change base path in .htaccess
And edit file:
Change base path to:
Note: Only do this if you installed the framework in the separate folder, if you installed it in the root folder, you can leave .htaccess file unchanged.
Thats it, Simple MVC Framework is now installed!