【问题标题】:Yii Bootstrap syntax error, unexpected T_CONSTANT_ENCAPSED_STRING ErrorYii Bootstrap 语法错误,意外的 T_CONSTANT_ENCAPSED_STRING 错误
【发布时间】:2015-01-23 03:20:47
【问题描述】:

我按照本教程 (http://www.youtube.com/watch?v=xKhT1fISgAs) 使用 yii 框架添加引导程序,但出现此错误

解析错误:语法错误,第 13 行的 E:\xampp\htdocs\yii_tuts\tt\protected\config\main.php 中出现意外的 T_CONSTANT_ENCAPSED_STRING

我遵循本教程中的每个步骤。但在视频中一切正常。

这是我在主配置文件中的代码

<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
    'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    'name'=>'My Web Application',

    'aliases'=>array(
        'bootstrap' => realpath(__DIR__'/../extension/yiibooster'),
    ),

    // preloading 'log' component
    'preload'=>array('log', 'bootstrap'),
    'theme'=>'heart',
    // autoloading model and component classes
    'import'=>array(
        'application.models.*',
        'application.components.*',
    ),

你能指出错误吗

【问题讨论】:

    标签: twitter-bootstrap yii yii-extensions


    【解决方案1】:

    你错过了一个.。更改您的代码如下:

    'aliases'=>array(
        'bootstrap' => realpath(__DIR__.'/../extension/yiibooster'),
    ), 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-03-10
      • 2023-04-09
      • 2014-02-25
      • 2012-11-13
      • 1970-01-01
      • 2017-11-04
      相关资源
      最近更新 更多