我正在尝试在 WAMP 服务器上配置 CakePHP 1.3。
问题是在 localhost://dreamdeal/css/generic.css
找不到我的 CSS。
如何在我的 webroot/index.php
中设置根路径?
我把这个路径设置为
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', 'C:' . DS . 'wamp' . DS . 'www' . DS . 'dreamdeal' );
}
但这并没有解决错误。
最佳答案
请看documentation for the folder structure来自 CakePHP。如果您想使用 CSS,该文件夹需要位于 Cake webroot/
文件夹中。它不应该在您的 localhost
根路径上。
关于css - CSS 和图像的根路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13289920/