ダン・クァン・ミン Blog

はじめまして

Setup Cakephp 3.x

Installing CakePHP

First, you’ll need to download and install Composer if you haven’t done so already. If you have cURL installed, it’s as easy as running the following:

curl -s https://getcomposer.org/installer | php

Now that you’ve downloaded and installed Composer, you can get a new CakePHP application by running:

php composer.phar create-project --prefer-dist cakephp/app [app_name]

Or if Composer is installed globally:

composer create-project --prefer-dist cakephp/app [app_name]

You can now visit the path to where you installed your CakePHP application and see the setup traffic lights.

Development Server

A development installation is the fastest method to setup CakePHP. In this example, we will be using CakePHP’s console to run PHP’s built-in web server which will make your application available at http://host:port. From the app directory, execute:

bin/cake server -H 192.168.13.37 -p 5673

Create .htaccess file

CakePHP webroot directory (will be copied to your application’s web root by bake):

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^$    app/webroot/    [L]
    RewriteRule    (.*) app/webroot/$1    [L]
</IfModule>

Comments