I created photo gallery page with php extension - yntour.php. I want to access the header.php file located in the includes folder by using php include satement. Header file has access to css files.
php include statement in yntour.php file
PHP Code:
$page_title = "Yun Nan Tour Gallery";
include('../includes/header.php');
when user browsed yntour.php page the navigation bar fomat is not correct.
the browser complained that global.css and navbar.css can't be found.
the file navbar.css controls navigation bar format is in css folder.
photo-gallery.css (is in css folder) controls the format for yntour.php page
I think I am confused with the file structure and don't know how to access specific file by using php include statement. Please take look at my code and file structure image to help me troubleshoot the problem. Thanks!
Use an absolute path instead of a relative path. Either of these options should do the job:
[code]
<style type="text/css">
@import url(/css/global.css);
@import url(http://www.yoursite.com/css/navbar.css);
</style>
[/color]
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks