Jump to content

Php Help?!


makaveli
 Share

Recommended Posts

i remember SSI could load in an external file, so you could say tell it to

><!--#include file=/web design/navigation.html" -->

 

and it would include the navigation bar in your page, advantages of this were if you needed to add something at a later date you could do this changing one file not many, it was also good for say footers where © 2006 would need to be 2007 soon.

 

anyways, how do i do this in php, i tried a code, it worked but none of the images worked.

 

if it helps im making these using slices from imageready and putting nav.php in a frame

 

the code i used (and i think its wrong) is

><div id="Layer2"> <?include("nav.php");
?> </div>

 

ive looked on php sites but "techno babble" just confused me

Link to comment
Share on other sites

thanks Thomas and Don, Legends :(

it looks to be working, i shall be going to London tomorrow with my head clear of all deadline worries :D

 

i was going in circles looking at the tech help on the net, it was "too deep" so as usual TCH family can help in plain english :)

Edited by makaveli
Link to comment
Share on other sites

so id have to assign them all to my exact web address i.e www.mysite.com/image/header.gif

:) seems annoying since i have to put them in the test area then also put the main folder!

 

tried http://testing.goldielookin.co.uk/images/title.gif (i.e full path) and still no joy!

Edited by makaveli
Link to comment
Share on other sites

aha don!

cracked it!!

thanks ever so much! it was the domain thing!

 

goldielookin.co.uk/phpphp works. (bits of it at current dont work as i need to change the code)

 

php is still a pain, but at least it works :(

 

and after slashing the slashes... it works :)

Edited by makaveli
Link to comment
Share on other sites

The title image shows fine.

<td colspan="3">

 

<img src="images/title.gif" width="800" height="48" border="0" alt="Tourist Information"></td>

</tr>

<tr>

<td rowspan="2">

<img src="/images/left.gif" width="48" height="552" alt=""></td>

<td>

<img src="/images/body.gif" width="586" height="522" alt=""></td>

<td rowspan="2">

<img src="/images/right.gif" width="166" height="552" alt=""></td>

 

</tr>

<tr>

<td>

<img src="/images/bottom.gif" width="586" height="30" alt=""></td>

</tr>

 

the other images (left,body,right,bottom) have a forward slash that the title image doesn't . The slash in bold.

I think removing that slash will correct your problem.

Link to comment
Share on other sites

asides a few images i need to put in take (need some in the train station, and its hard to get them without getting told off!)

(it's a travel site for a project)

 

it's all done..

 

thanks ever so much to everyone that has helped in any way, shape or form!

have some e-gold :) :)

Link to comment
Share on other sites

Just remember to use single quotes around strings as this is faster. If you use double quotes PHP will scan the string looking for any variables in it.

 

As Don says using PHP can make maintaining your site a lot easier. Every page on my site consists of three parts. The header, the content and the footer. The content only contains the include for the header, the actual HTML for that pages content and then the include for the footer. Using this method along with a CSS controlled layout means it's a lot easier to change your sites look.

 

If you want I have some ebooks at home on PHP that I will happily send to you.

Edited by carbonize
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...