PHP include function not display images or css

I am testing a small blog site I created using XAMPP. PHP files work with includes when in parent folder, but I have a folder called "2016" inside the same htdocs folder and in that folder I have "1" "2" "3" "4" etc for the months.

In each of these folders I will put blog posts (php files with html includes), but when I do the includes, only the html is loaded, the images nor the css are not.

Below are the includes I have tried:

<?php $page_title = 'Test Page';    $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/includes/header.html"; include($path);    ?> 

and also tried

<?php  include ('/../../includes/sidebar.html');  include ('/../../includes/footer.html');  ?> 

Neither options have worked.

Any help will be greatly appreciated!

Replay

Category: php Time: 2016-07-31 Views: 10
Tags: php html css xampp

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.108 (s). 12 q(s)