• Yii自动生成项目


     
    我喜欢尝试新鲜的东西。以前一直用gii生成工具,前几天突然发现用shell的方法,感觉很不错。特此总结一下yii的几个命令。
     
    gii的工具页面:
    - Controller Generator
    - Crud Generator
    - Form Generator
    - Model Generator
    - Module Generator
     
    shell对应的命令
    - controller
    - crud
    - form
    - help
    - model
    - module
     
    一、gii生成方法:
    first:打开gii模块
    'modules'=>array(
    'gii'=>array(
    'class'=>'system.gii.GiiModule',
    'password'=>'Enter Your Password Here',
    // If removed, Gii defaults to localhost only. Edit carefully to taste.
    'ipFilters'=>array('127.0.0.1','::1'),
    ),
    ),
    second:打开gii的管理页面
    a、localhost/webappname/index.php?r=gii
    b、密码即为
    Enter Your Password Here,可更改。
    //======备注:有可能需要注释掉
    'urlManager'模块,它定义的url重写方式会使你无法访问。
     
    二、shell生成方法:
    first:打开dos下项目目录
    例如:C:Documents and Settingsadways>d:
    D:>cd D:phpwsyii_blog_comment
    D:phpwsyii_blog_comment>D:phpwsyii_blog_commentyiiframeworkyiic shell
    >> model tbl_visitor
    万事ok了,一步到位~
     
    Add: yiic生成项目:
    first:打开dos下目标目录
    例如:C:Documents and Settingsadways>d:
    D:>cd D:phpyiiframework
    D:phpyiiframework>yiic webapp d:php ima
    over~~
  • 相关阅读:
    phpmyadmin漏洞复现
    ecshop漏洞复现
    php漏洞复现
    discuz漏洞复现
    gitlab漏洞复现
    Elasticsearch漏洞复现
    flask漏洞复现
    Hikari配置
    DOM&BOM的起源,方法,内容,应用
    vue 实现div方框内大图自由拖拽
  • 原文地址:https://www.cnblogs.com/jthb/p/3195468.html
Copyright © 2020-2023  润新知