1

我想用语法生成CSS标签。CakePhpMyHTML被成功省略但 CSS没有调用。我已经把我的css放进去了 app\webroot\css

下面是我的代码。我正在使用以下 CakePhp 的语法。

我也在使用DebugKit. 希望它不会造成任何问题。

        echo $this->Html->meta('icon');

        echo $this->Html->css('bootstrap');
        echo $this->Html->css('bootstrap-responsive');
        echo $this->Html->css('admin');

        echo $this->fetch('meta');
        echo $this->fetch('css');
        echo $this->fetch('script');

HTML

  <html lang="en">
          <head>
            <meta charset="utf-8">
            <title>Dashboard :: Base Admin</title>
            <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
            <meta name="apple-mobile-web-app-capable" content="yes">    

<?php
        echo $this->Html->meta('icon');

        echo $this->Html->css('bootstrap');
        echo $this->Html->css('bootstrap-responsive');
        echo $this->Html->css('admin');

        echo $this->fetch('meta');
        echo $this->fetch('css');
        echo $this->fetch('script');
            ?>
            <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet">       
            <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
            <!--[if lt IE 9]>
              <script src="../assets/js/html5shiv.js"></script>
            <![endif]-->
     </head>

控制器

class AdminsController extends AppController {
        var $helpers = array('Html','Form');
        public function index() {

        }
    }

结果来了

<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Dashboard :: Base Admin</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">    
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet">       
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="../assets/js/html5shiv.js"></script>
    <![endif]-->
  </head>
4

1 回答 1

0

也许尝试重新下载并提取一个新的蛋糕副本,看看是否有同样的问题,只是为了排除特定的安装或 PHP 问题?

于 2013-06-28T11:50:31.677 回答