zoukankan      html  css  js  c++  java
  • Yii2中系统定义的常用路径别名,如果获取web的url

    下面这些别名都是在Yii2里面系统定义的,可以直接拿来就用

    • '@yii' =>
      •       '@yii/swiftmailer' => string 'C:wampwwwadvancedvendor/yiisoft/yii2-swiftmailer' (length=52)
      •       '@yii/gii' => string 'C:wampwwwadvancedvendor/yiisoft/yii2-gii' (length=44)
      •       '@yii/faker' => string 'C:wampwwwadvancedvendor/yiisoft/yii2-faker' (length=46)
      •       '@yii/debug' => string 'C:wampwwwadvancedvendor/yiisoft/yii2-debug' (length=46)
      •       '@yii/codeception' => string 'C:wampwwwadvancedvendor/yiisoft/yii2-codeception' (length=52)
      •       '@yii/bootstrap' => string 'C:wampwwwadvancedvendor/yiisoft/yii2-bootstrap' (length=50)
      •       '@yii' => string 'C:wampwwwadvancedvendoryiisoftyii2' (length=40)
    •   '@app' => string 'C:wampwwwadvancedfrontend' (length=29)
    •   '@vendor' => string 'C:wampwwwadvanced/vendor' (length=27)
    •   '@bower' => string 'C:wampwwwadvanced/vendorower' (length=33)
    •   '@npm' => string 'C:wampwwwadvanced/vendor pm' (length=31)
    •   '@runtime' => string 'C:wampwwwadvancedfrontend untime' (length=37)
    •   '@webroot' => string 'C:/wamp/www/advanced/frontend/web' (length=33)
    •   '@web' => string '/advanced/frontend/web' (length=22)


    其中最常用的别名有

    • @app
    • @vendor
    • @runtime
    • @webroot
    • @web


    而且可以看到除了@web别名是url外,其它的都是物理路径

    http://yiifans.com/forum.php?mod=viewthread&tid=9578&extra=

  • 相关阅读:
    Action/Service/DAO简介 一
    Python中的Nonetype类型怎么判断?
    idea 中使用maven命令
    python-字符串中含有变量的表示方法
    python-configparser模块,读取配置文件
    python json 和 dict
    python interpreter解释器设置
    python写入数据到excel-xlwt模块(不能修改,每次写入全覆盖)
    pymongo问题集合
    excel表操作使用记录
  • 原文地址:https://www.cnblogs.com/lovelp/p/5518258.html
Copyright © 2011-2022 走看看