Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
1 registered (SteveS), 42 Guests and 13 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 05/23/08
Posts: 10
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 14
AllenAyres 12
dbremer 10
SD 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Topic Options
#184431 - 05/18/07 12:57 PM Basic question on PHP and Post Islands
ehm1 Offline
member
Registered: 06/07/06
Posts: 183
This could be a very basicly question but PHP is not my main stream...
I do have my index page on my server that is 'index.html'
I want to display a custom island on that page, that is this one below:
---------
<?php
if (!defined('UBB_MAIN_PROGRAM')) define('UBB_MAIN_PROGRAM',1);
$style_side="";$tbopen="";$tbclose="";
echo "<table width=\"100%\">";
include("/www/forum/languages/portuguese/portal_islands.php");
include("/www/forum/languages/portuguese/generic.php");
include("/www/forum/cache/post_island_12.php");
echo "</table>";
?>
-----------

The problem is that when I put it on my 'index.html' page, it display as a plain text.
If I change the name of my index to 'index.php' it display right

For a reason I don't want to start changing all my .html pages that will have custon islands, to be a .php pages.
What would be the work around?

Thank you
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#184434 - 05/18/07 02:16 PM Re: Basic question on PHP and Post Islands [Re: ehm1]
ehm1 Offline
member
Registered: 06/07/06
Posts: 183
answering my own question, just in case you may need it:

For Apache Servers Edit your .htacess with AddType application/x-httpd-php .htm .html Then Add the php code from the reader directly to your html pages
Top
#184452 - 05/18/07 08:00 PM Re: Basic question on PHP and Post Islands [Re: ehm1]
Gizmo Offline

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
.html files are not parsed by php, unless you explicidly set your server to do so; thus, php code in the index.html page will not parse as php code, it will show inline as regular text.

I would however recommend against doing this, as it will add overhead as all html/htm files will parse through php when they won't all have php coding in them; instead, utilize files with the .php extension when needed.
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Due Date Calculator-Calculate When Your Baby is Due
by StewartMyduedate
Today at 12:54 AM
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
Forum Stats
10491 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image