R
R
Roman Yamchuk2018-04-05 16:06:22
1C-Bitrix
Roman Yamchuk, 2018-04-05 16:06:22

How can I tell if a module is in the local folder?

I develop my module, I place it in the local folder. During installation, the module must copy files to the bitrix/admin folder. I'm trying to make a more flexible solution that will take into account that the module is located either in local / modules or in bitrix / modules.

public function installFiles(){
    CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/actual/install/admin', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin'); //нужна константа или метод определяющий что установщик находится в папке local или bitrix

        return true;
    }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Yamchuk, 2018-04-05
@tomgif

Found
getLocalPath('modules/actual/install/index.php');

N
Nikita, 2018-04-05
@Rema1ns

you can parse __DIR__

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question