css - CSS 和图像的根路径

标签 css cakephp-1.3

我正在尝试在 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/

相关文章:

html - 如何垂直对齐标签和文本字段?

html - 文本未与@media 屏幕中心对齐并且(最小宽度 :992px) and (max-width:1199px)

css - 嵌套面板高度

cakephp - 路由: 'admin' => true vs 'prefix' => 'admin in CakePHP

php - 如果我使用 $this->Form->textarea() 验证在 cake php 中不起作用

php - CakePHP框架中的MySQL SET和ENUM类型

jquery - 为什么 Fancybox 只适用于图像的第一部分?

html - 如何在CSS中制作底部完整的圆圈

mysql - 为什么 CakePHP 1.3 会自动填充 "Modified"而不是 "Created"字段?

升级到 PHP 5.4 后 CakePHP 控制台问题