i'm trying to create a website using php, and i using external css file.
i have head.php file
<title>TITLE</title>
<link rel="stylesheet" type="text/css" href="style/style.css" />
this is my index.php file
$server = $_SERVER['DOCUMENT_ROOT'];
include $server.'/head.php';
it's works fine, but when i try to create other index.php file in child directory like child/index.php, it said css file not found. i tried to change head.php to
<link rel="stylesheet" type="text/css" href="<? echo $server ?>/style/style.css" />
and it's doesn't worked too.
how do i resolve this problem?