PHP Include() Function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dragon2309
Forum Newbie
Posts: 8
Joined: Sun Oct 30, 2005 8:54 am

PHP Include() Function

Post by dragon2309 »

Hi, i have a .htm file whihc contains SCRIPT src links to a javascript menu, this file is called menu.htm... On my index.php file i have a general layout set up using tables. In one of the table cells i have entered

This works fine, the menu gets displayed on the index.php file, only one problem, the menu gets displayed as it nwould do on the menu.htm file, theis means its butted up against the left hand side of the window, even though i put the INCLUDE function into the table cell, what i wanted it to do is shove the mune into the table cell (obviously it doesnt work like that)...

So my question, is there any alternative to the INCLUDE function... or is there some parameter im missing?? Sorry, this probably sounds really n00bish, lol. Any help given is much apreciated.

dragon
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

Post your code!
dragon2309
Forum Newbie
Posts: 8
Joined: Sun Oct 30, 2005 8:54 am

Post by dragon2309 »

ok, below is the index.php file, there is only one tiny block of PHP midway down.... this page is at http://www.cambercaravan.co.uk, the server is playing up though, so it mihgt not be up....

code =

Code: Select all

<html>

<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>CamberCaravan.co.uk</title>
</head>
<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<p></p>
<div align="center">
    <table border="0" width="60%" id="table1" style="border-collapse: collapse" height="684">
        <tr>
            <td colspan="2" height="202">
<img src="img/mainhead1.jpg" width="800" height="200"></td>
        </tr>
        <tr>
            <td width="24%" height="90%"><?php include("menu.htm"); ?></php></td>
            <td width="76%" height="90%">&nbsp;</td>
        </tr>
    </table>
</div>
</body>
</html>
cheers for the reply - dragon
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

PHP didn't do anything... you just need to change the prop in "menu_array.js"...
In line 68 where there is a comment:

Code: Select all

,   // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
You need to change:

Code: Select all

"center",   // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
dragon2309
Forum Newbie
Posts: 8
Joined: Sun Oct 30, 2005 8:54 am

Post by dragon2309 »

ok, i kind of understand you, but what would i change it to to get it to sit inside the cell where its supposed to be???

thanks, dragon
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

dragon2309
Forum Newbie
Posts: 8
Joined: Sun Oct 30, 2005 8:54 am

Post by dragon2309 »

ok, readong through now.... although they are talking about a different menu version completely, than the one im using.... so when it talks about menu_data.js, i dont have that file.... is that a problem...

dragon
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

I don't know how those menus work... Go over their manuals and forums and see what they have there!!! :D
dragon2309
Forum Newbie
Posts: 8
Joined: Sun Oct 30, 2005 8:54 am

Post by dragon2309 »

ok, thanks man, been a great help.... will get on to their site in a few moments, thanks

dragon
dragon2309
Forum Newbie
Posts: 8
Joined: Sun Oct 30, 2005 8:54 am

Post by dragon2309 »

just to let you know, in case you were wodering or if anyone else is following the thread.... i had to change over menus, to the one mentioned in the link provided by "ok". the one i was using didnt support relative positioning on pages, chenged to the other one, what you have to o ewith this one is <SCRIPT> in the Main Menu, the on that is always visible, into the table cell, and then leave the javascript src links in the head as usual.... this makes it work fine

cheers for the gelpful relies "ok", dragon :D
Post Reply