質問編集履歴
1
ルーティング設定追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -28,4 +28,51 @@
|
|
28
28
|
|
29
29
|
がしかし、アクセスしてもエラーが出てしまいます。なぜでしょうか?
|
30
30
|
|
31
|
-
cakephpは正常に動いております。
|
31
|
+
cakephpは正常に動いております。
|
32
|
+
|
33
|
+
追記(routers.php)
|
34
|
+
```ここに言語を入力
|
35
|
+
<?php
|
36
|
+
/**
|
37
|
+
* Routes configuration
|
38
|
+
*
|
39
|
+
* In this file, you set up routes to your controllers and their actions.
|
40
|
+
* Routes are very important mechanism that allows you to freely connect
|
41
|
+
* different URLs to chosen controllers and their actions (functions).
|
42
|
+
*
|
43
|
+
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
44
|
+
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
45
|
+
*
|
46
|
+
* Licensed under The MIT License
|
47
|
+
* For full copyright and license information, please see the LICENSE.txt
|
48
|
+
* Redistributions of files must retain the above copyright notice.
|
49
|
+
*
|
50
|
+
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
51
|
+
* @link http://cakephp.org CakePHP(tm) Project
|
52
|
+
* @package app.Config
|
53
|
+
* @since CakePHP(tm) v 0.2.9
|
54
|
+
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
55
|
+
*/
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Here, we are connecting '/' (base path) to controller called 'Pages',
|
59
|
+
* its action called 'display', and we pass a param to select the view file
|
60
|
+
* to use (in this case, /app/View/Pages/home.ctp)...
|
61
|
+
*/
|
62
|
+
Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
|
63
|
+
/**
|
64
|
+
* ...and connect the rest of 'Pages' controller's URLs.
|
65
|
+
*/
|
66
|
+
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Load all plugin routes. See the CakePlugin documentation on
|
70
|
+
* how to customize the loading of plugin routes.
|
71
|
+
*/
|
72
|
+
CakePlugin::routes();
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Load the CakePHP default routes. Only remove this if you do not want to use
|
76
|
+
* the built-in default routes.
|
77
|
+
*/
|
78
|
+
```
|