php - 如何在 yii 中运行 giix 扩展

标签 php yii

我使用以下网址运行gii:localhost/path to index.php?r=gii,但仅gii模块运行而不运行giix。

请告诉我 giix 的正确配置?

我的 config.php 是:

'import'=>array(
    'application.models.*',
    'application.components.*',
),
'gii' => array(
    'class' => 'system.gii.GiiModule',
    'password'=>'.......',
    'generatorPaths' => array(
        'ext.giix.generators', // giix generators
    ),
),
'components'=>array(
    'ext.giix.components.*', 
    'messages' => array ( // giix messages directory,giix is  and extension.
        'extensionBasePaths' => array(
            'ext.giix.messages', // giix messages directory.
        ),
    ),
),

最佳答案

根据 Giix 文档,您需要导入'ext.giix-components.*',并且生成器路径应为'ext.giix-core'。所以你的代码应该如下所示:

 'import'=>array(
        'application.models.*',
        'application.components.*',
        'ext.giix-components.*', // You need to import the giix component
    ),
    'gii' => array(
        'class' => 'system.gii.GiiModule',
        'password'=>'.......',
        'generatorPaths' => array(
            'ext.giix-core', // giix generator
        ),
    ),

关于php - 如何在 yii 中运行 giix 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13454630/

相关文章:

javascript - 在 php 中使用 JS 变量需要棘手的想法

php - yii语言本地化mysql表数据进入 View

php - Yii 中的无限滚动

php - Yii2:为特定 Controller 设置布局

php - 无法使用 PHP 脚本远程连接到 MySQL 错误 (13),通过 CLI 连接有效

javascript - 将 PHP 变量值发送到同一页面中的 JavaScript 弹出窗口

PHP如何将数字指数转换为字符串?

php - 函数在 PHP DateTime 中的值?

php - 使用 YII 框架发送 HTTP Post 请求

mysql - 在 Yii 中从数据库生成模型?