views:

148

answers:

1

Hi, I am new to Cakephp, and very excited to learn it.

I read the docs, downloaded the files, place it on my www root folder. (I am using WAMP).

My question is, can I download 1 cakephp and do for multiple projects, for example I put my cakephp at %webroot%, so my to call my projects:

[http://localhost/cake/project1]

[http://localhost/cake/project2]

and so on...

A: 

You can have as many Cake projects as you want on your server. The easiest is to just all put them in their separate subfolders.

webroot/
    project1/
        app/
        cake/
        vendors/
    project2/
        app/
        cake/
        vendors/

A little more advanced technique is to separate the app and cake directories:

cake/
webroot/
    app1/
        controllers/
        ...
        webroot/
            index.php
    app2/
        controllers/
        ...
        webroot/
            index.php

You will need to edit the app/webroot/index.php files to point to the correct location of the cake/ directory, which you can keep anywhere you want.

Even better, and the recommended setup for your live production server, is to separate the cake, app and webroot directories. This way you can even have several applications that share a common cake folder.

cake/
app1/
    controllers/
    ...
app2/
    controllers/
    ...
webroot/
    app1_webroot/
        index.php
    app2_webroot/
        index.php

In this case, you're only ever exposing the contents of the app/webroot/ directory to the public, while the cake library and the actual app files remain in a different directory not visible to the public. All you need to do is edit the paths in the app/webroot/index.php file to point to the correct directories.

deceze
hmmm... I think i got your idea. Thanks =]
learner.php
Might be handy, http://bakery.cakephp.org/articles/view/installing-cakephp-on-macos-x
DavidYell