PHP Flow

Can someone please tell me what this code is doing? Esp. the require lines. Where are ‘DIR_WS_TEMPLATES’ AND ‘TEMPLATE_NAME’ located?

include_once(“ait_file_library.inc.php”);
require(‘includes/application_top.php’);

$content = “hood_story”;

require(DIR_WS_TEMPLATES . TEMPLATE_NAME . ‘/’ . TEMPLATENAME_MAIN_PAGE);
require(DIR_WS_INCLUDES . ‘application_bottom.php’);

The require lines makes it mandatory that the application_top.php page is used (which probably contains he header information that’s on all of your pages.

The DIR_WS_TEMPLATES are constants that are defined, most likely from in include that’s listed in the application_top.php. Most times it’s defined in a config.php page someplace.

Sponsor our Newsletter | Privacy Policy | Terms of Service