How can CSS and JavaScript integration be affected when using a custom template system in PHP?

When using a custom template system in PHP, CSS and JavaScript integration can be affected because the template system may not allow for easy inclusion of external CSS and JavaScript files. To solve this issue, you can create PHP functions to output the necessary CSS and JavaScript links within the template files.

// Function to include CSS file in custom PHP template
function include_css($file_path) {
    echo '<link rel="stylesheet" type="text/css" href="' . $file_path . '">';
}

// Function to include JavaScript file in custom PHP template
function include_js($file_path) {
    echo '<script src="' . $file_path . '"></script>';
}

// Example usage in template file
include_css('styles.css');
include_js('script.js');