Jump to content


Photo

php file in html content box help??


  • Please log in to reply
7 replies to this topic

#1 dreadlock

dreadlock

    Young Padawan

  • Members
  • Pip
  • 26 posts

Posted 17 January 2005 - 05:52 PM

hi there,

im trying to display a php file in a html content box but cant seem to suss it out?? :D

heres the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR...ml4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #CCCCCC;
}
-->
</style>
</head>

<body>

</div>
<center>
<table width="660" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="/images/vwartest_04.gif"><div align="center">test</div></td>
</tr>
</table>
<table width="660" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="/images/vwartest_06.gif">&nbsp;heres where i want the file displayed</td>
</tr>
</table></center>
</div>
</body>
</html>

its on the bottom box i want it where it says"heres where i want the file displayed" any help would be much appreciated! :D its only a test just trying to suus it out ;)

thx in advance!

dread

#2 Jaymz

Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 17 January 2005 - 06:15 PM

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #CCCCCC;
}
-->
</style>
</head>

<body>

</div>
<center>
<table width="660" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="/images/vwartest_04.gif"><div align="center">test</div></td>
</tr>
</table>
<table width="660" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="/images/vwartest_06.gif"><?PHP include "file.php"; ?></td>
</tr>
</table></center>
</div>
</body>
</html>

If I understand you correctly, you want to include a php file. Now you'll have to change the extension of this file from .html to .php for this to work. ;)

#3 dreadlock

dreadlock

    Young Padawan

  • Members
  • Pip
  • 26 posts

Posted 18 January 2005 - 12:38 PM

hi thx for reply :angry:

didnt seem to work though m8?

heres the page as it looks now....

http://www.vwar.clan-design.co.uk/

this is the file im trying to place in the content box..........

http://www.vwar.clan...ar/calendar.php

and this is the code again as it looks now..........

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR...ml4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #CCCCCC;
}
-->
</style>
</head>

<body>

</div>
<center>
<table width="660" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td background="/images/vwartest_04.gif"><div align="center">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</div></td>
  </tr>
</table>
<table width="660" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td background="/images/vwartest_06.gif">?PHP include "http://www.vwar.clan.../calendar.php"; ?</td>
  </tr>
</table></center>
</div>
</body>
</html>


thx again in advance :)

#4 dev0

dev0

    Young Padawan

  • Members
  • Pip
  • 24 posts

Posted 18 January 2005 - 01:21 PM

<? include"filename.type" ?>

#5 dev0

dev0

    Young Padawan

  • Members
  • Pip
  • 24 posts

Posted 18 January 2005 - 01:23 PM

<?php include("filename.type") ?> actually sorri

#6 dreadlock

dreadlock

    Young Padawan

  • Members
  • Pip
  • 26 posts

Posted 18 January 2005 - 02:08 PM

exellent m8 thx a million :) :angry: :angry:

#7 Jaymz

Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 18 January 2005 - 04:00 PM

The problem with your code was its <?PHP include "file"; ?> instead of ?PHP include "file";?

It has to be wrapped in < and >.

#8 dreadlock

dreadlock

    Young Padawan

  • Members
  • Pip
  • 26 posts

Posted 18 January 2005 - 05:43 PM

yeah thats what i missed < >

ty!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users