I ran into a problem when working with PHP buffer. The essence of the problem: when you connect an HTML file in which there is a CSS file connection, CSS is not displayed on the page. I double-checked the code, and through the inspector of the elements, too - in the browser this CSS file is opened by reference without any problems, the paths are correct. I was looking for a problem with Google but I didn’t find anything.
ob_start();
require $filePath;
ob_get_flush();
and required files.
<link rel="stylesheet" href="<?= ROOT ?>css/main.css">
ob_get_flush();probably retunrs the string, but your code doesn't do anything with it. Tryecho ob_get_flush();or assign to variable and check its value other way.ROOTtranslates to absolute path to the file (with domain and https if you use one). Check network response to css request in browser's developer tools (F12usually). Also look at answers to this question