I am trying to make a simple application in PHP (MVC). I made the routing and in Views i created an inc folder where head.php - header.php - footer.php exists. The head.php is included in header.php. In the head.php title there is a $pageTitle variable. The thing is that when i include the header.php in other files even if the $pageTitle is changing (according to the new value) no styles from css file is presented!!!
my head.php file is
<head>
<meta charset="utf-8">
<title><?php echo $pageTitle ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../src/css/bootstrap.min.css" rel="stylesheet">
<link href="../src/css/main.css" rel="stylesheet">
<script src="../src/js/bootstrap.min.js"></script>
</head>
my header.php is
<!doctype html>
<html>
<?php
define( 'ROOT_DIR', dirname(__FILE__) );
include( ROOT_DIR.'/inc/head.php' );
// include 'inc/head.php';
// include '../app/views/inc/head.php';
?>
and i include the header
<?php
$pageTitle = "login-register | Twitter";
define( 'ROOT_DIR', dirname(__FILE__) );
include( ROOT_DIR.'/inc/header.php' );
// include '../app/views/inc/header.php';
?>
I tried many different options but nothing worked. I searched and tried everything (i think)
/src/css/main.css