FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


include() for phpbb = blank?





Ghost Face
So I'm trying to use my frihost site to put my forums on, but when I use the include function it won't load the pictures and it makes the forums horrific/unuseable. It will, though, load the html and css, just not the pics. Does anyone know why? (I took it down and just made it a redirect page, but I'd still like to know Very Happy)
mathiaus
youve provided no code or anything so its hard to say really. To show images you should be using
Code:
<img src="URL" height="HEIGHT" width="WIDTH" alt="" />


not sure if you did this but if you did its wrong
Code:
<?php include('image.gif'); ?>
wumingsden
It because the images think there at http://www.yoursite.com/templates/*your_template_folder*/images/*image_name*.gif instead of http://www.yoursite.com/forum/templates/*your_template_folder*/images/*image_name*.gif

Note that the links will also not work. To use an include the file has to be in your forum directory.

For example the following file is located in the forum directory http://www.mezmorizing.net/forum/test.php - the images and links work fine - (note that it looks screwed up because I am using other includes and a table in the page so it is squashed

the following file though doesn't look ok, the images/links don't work as its located outside of the forum directory:
http://www.mezmorizing.net/test1.php

Another way to show the images would be to change all image paths to forum/template/*template_name* instead. But this of course will mean that you have to have a folder named "forum" inside the "forum" folder which is where everything gets a little confusing.
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.