Magento Expert Forum - Improve your Magento experience

Results 1 to 1 of 1

How to Get Root Directory Path in Magento 2

  1. #1
    Junior Member
    Join Date
    Aug 2022
    Posts
    182
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to Get Root Directory Path in Magento 2

    Is it safe to say that you are a Magento designer dealing with building expansions?

    In the event that indeed, you should get root directory path in Magento 2.

    You will require admittance to information put away in the root organizer which can be gotten utilizing the registry way.
    Subsequently, execute the underneath answer for get a catalog way in Magento 2.
    In this instructional exercise, Today I will clear up how for get the root catalog way in Magento 2. In the event that you want to establish the registry way in your custom module, you want to infuse \Magento\Framework\Filesystem\DirectoryList class in your build.
    While building your custom augmentation, you will as a rule need way to your expansions documents. In the event that you really want to establish the catalog way in your custom module
    That is all there is to it !!!

    For more information,visit : https://meetanshi.com/blog/get-root-...-in-magento-2/

    View more threads in the same category:

    Last edited by vale.eythan; 21-12-2022 at 03:48 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •