Tejas Rana

Getting Started with CakePHP

CakePHP is widely used framework of PHP. It is completely build in MVC structure and almost have all built in functions which boost your web application.
What you need:

Download CakePHP from: https://github.com/cakephp/cakephp/releases/tag/2.6.7
Extract and move it to Apache www directory.
The Structure:

/app
/lib
/plugins
/vendors
.htaccess
index.php
README

Now create a Database in MySQL.
And set up the config file in /app/Config/database.php

<?php
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'port' => '',
'login' => 'cakeBlog',
'password' => 'c4k3-rUl3Z',
'database' => 'cake_blog_tutorial',
'schema' => '',
'prefix' => '',
'encoding' => 'utf8'
);
?>

 
 
Note if you are getting 500 internal server error while executing cakephp in Browser then check Apache mod_rewrite mod is enable.
That’s it for now. Now in next tutorial we will start how to write code and manage controller, models & Views

Exit mobile version