...

View Full Version : PHP include('includes/dheader.php'); problem with path



darma1985
01-24-2012, 05:20 AM
Below are the example please help me on this my css not working any many more links in the dheader

File List
www.example.com/includes/dheader.php
www.example.com/assets/css/dstyle.css
www.example.com/index.php : include('includes/dheader.php');* css working
www.example.com/category/books.php :include('../includes/dheader.php');
*css not working


dheader script



<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Books Store</title>
<meta name="Description" content="Book Store">

<link rel="stylesheet" href="assets/css/dstyle.css">

</head>

Please help on this script to make links on dheader works in all sub directory

Thanks in advance

felgall
01-24-2012, 06:05 AM
<link rel="stylesheet" href="/assets/css/dstyle.css">

to make it relative to the domain rather than the current page.

darma1985
01-24-2012, 06:33 AM
Thank you very this does work .I have spend alot of time doing the ini set include path nothing works

Thanks alot again.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum