- Method of arranging directory that needs manager authority.
- Method of arranging directory that doesn't need manager authority.
- ROOT定数にappを含むディレクトリへのパスを設定する。
- APP_DIR定数にappディレクトリの名前を設定する。
- CAKE_CORE_INCLUDE_PATH定数にcakeディレクトリを含むディレクトリへのパスを設定する。
├var
│
├www
│ │ ├cake ← When the archive is extracted,
│ │ │ ├app
│ │ │ │ ├config
│ │ │ │ ├controllers
│ │ │ │ ├models
│ │ │ │ ├plugins
│ │ │ │ ├tmp
│ │ │ │ ├vendors
│ │ │ │ ├views
│ │ │ │ ├webroot ← It is set to the document route.
│ │ │ │ ├.htaccess
│ │ │ │ └index.php
│ │ │ ├cake
│ │ │ ├vendors
│ │ │ ├.htaccess
│ │ │ └index.php
├cake
│ ├app ・・・(1)
│ │ ├config
│ │ ├controllers
│ │ ├models
│ │ ├plugins
│ │ ├tmp
│ │ ├vendors
│ │ ├views
│ │ ├webroot ・・・(3)
│ │ ├.htaccess
│ │ └index.php
│ ├cake ・・・(2)
│ ├vendors
│ ├.htaccess
│ └index.php
It becomes the following if it arranges it according to the custom of the Linux system.
│
├ home
│ └ user
│ └ app ← Directory (1) is moved here.
├ usr
│ └ lib
│ └ cake ← Directory (2) is moved here.
├ var
│ └ www
│ └ *** ← Contents of the directory that name is (3) are moved here.
The procedure summary.
unzip ./cakephp-cakephp-1.3.5-0-ga16f4c5.zip
$ mv ./cakephp-cakephp-fd82f1b/app /home/user/app
$ mv ./cakephp-cakephp-fd82f1b/cake /usr/lib/cake
$ mv ./cakephp-cakephp-fd82f1b/app/webroot/* /var/www
$ mv ./cakephp-cakephp-fd82f1b/app/webroot/.htaccess /var/www
$ chmod -R 0777 /home/user/app/tmp
When the movement of the file is completed, three places of the following of the content of index.php are edited.
今回の例では、"/home/user"
今回の例では、"app"
今回の例では、"/usr/lib"
Concretely, it edits it as follows.
if (!defined('ROOT')) {
define('ROOT', DS . "home" . DS . "user");
}
if (!defined('APP_DIR')) {
define('APP_DIR', "app");
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', DS . "usr" . DS . "lib");
}
0 件のコメント:
コメントを投稿