2012-11-08 40 views
0

我想在WAMPserver上配置CakePHP 1.3。CSS和圖像的根路徑

問題是我的CSS沒有在localhost://dreamdeal/css/generic.css找到。

如何在我的webroot/index.php中設置根路徑?

我設置路徑

if (!defined('CAKE_CORE_INCLUDE_PATH')) { 
     define('CAKE_CORE_INCLUDE_PATH', 'C:' . DS . 'wamp' . DS . 'www' . DS . 'dreamdeal'); 
} 

但沒有修復錯誤。

+0

首先,'localhost'是[host](http://wiki.answers.com/Q/Which_part_is_the_host_of_URL_address),而不是[protocol](https://en.wikipedia.org/wiki/URI_scheme) 。 – user2428118

回答

1

請看CakePHP的documentation for the folder structure。如果你想使用CSS,那個文件夾需要在Cake webroot/文件夾中。它不應該在你的根路徑localhost

+0

我的css是cakephp默認的css,它保留在webroot文件夾中。但我的webroot網址不正確,這就是爲什麼沒有找到css和圖像。請告訴我如何配置我的webroot路徑? – Ahsan