php - Constant DB already define

one text

Solution:

This is happening because your define is inside getDBConnection, which you call more than once. You need to move the definitions outside the function at the top of config.php

Source