How can specific pages or functions be activated or deactivated in a PHP admin area?

To activate or deactivate specific pages or functions in a PHP admin area, you can use a configuration file where you define a variable for each page or function. Then, in your admin area code, you can check the value of these variables to determine whether to show or hide the page or function.

// config.php
$showPage1 = true;
$showPage2 = false;
$showFunction1 = true;
$showFunction2 = false;

// admin_area.php
include 'config.php';

if($showPage1){
    // display page 1 content
}

if($showPage2){
    // display page 2 content
}

if($showFunction1){
    // execute function 1
}

if($showFunction2){
    // execute function 2
}