代码拉取完成,页面将自动刷新
同步操作将从 alen/magento 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
https://bbs.aiweline.com/thread-21231.htm
magento2获取路径操作
1、目录类: Magento\Framework\App\Filesystem\DirectoryList
2. 实例化目录类:
$_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$this->directory_list = $_objectManager->get('\Magento\Framework\App\Filesystem\DirectoryList');
读取目录类各种参数
//根目录
$this->directory_list->getRoot();
/*获取应用程序文件夹*/
$this->directory_list->getPath('app');
/*获取配置文件夹*/
$this->directory_list->getPath('etc');
/*获取库或第三方组件文件夹*/
$this->directory_list->getPath('lib_internal');
/*获取需要通过Web服务器文件夹公开访问的库/组件*/
$this->directory_list->getPath('lib_web');
/*获取公用文件夹*/
$this->directory_list->getPath('pub');
/*获取静态文件夹*/
$this->directory_list->getPath('static');
/*获取var文件夹*/
$this->directory_list->getPath('var');
/*获取文件系统缓存目录(如果使用文件系统缓存)*/
$this->directory_list->getPath('cache');
/*获取系统消息和错误的日志*/
$this->directory_list->getPath('log');
/*获取文件系统会话目录(如果使用了文件系统会话存储)*/
$this->directory_list->getPath('session');
/*获取安装程序应用程序的目录*/
$this->directory_list->getPath('setup');
/*获取与依赖项注入相关的文件目录*/
$this->directory_list->getPath('di');
/*生成代码的相对目录键*/
$this->directory_list->getPath('generation');
$this->directory_list->getPath('upload');
/*如果Composer由Magento Application运行,则存储与Composer相关的文件(配置,缓存等)的 目录*/
$this->directory_list->getPath('composer_home');
/*临时实现目录的后缀,将在其中写入预处理的文件(如有必要)*/
$this->directory_list->getPath('view_preprocessed');
/*获取模板缩小目录*/
$this->directory_list->getPath('html');
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。