tonomud
02-04-2003, 06:45 PM
OK, first let me say that I'm not a PHP programmer. I'm going to learn, but I'm trying to fiddle around with a couple things while I'm waiting for the book to arrive.
I'm developing a decent-sized site, and I'm looking to use some sort of include for my header, footer, and navigation. I've been doing some research around the net regarding that as well. It seems that there are a couple of options: PHP and SSI. I've done server side includes before, but since I'm hoping to learn PHP, I thought I'd give that a try.
OK, I'm able to get a plain text .txt file to include. My navigation element is an .html file generated by ImageReady (uses javascript). And my header is a plain old .jpg. So I'm having some problems with the navigation and .jpg header.
For the .jpg, I get a parse error. For the navigation, the .html file is parsed, but all of the images are displayed as broken. I am able to load the navigation .html by itself by typing in its address, and it displays correctly.
What might I be doing wrong? Here's the code for the .html navigation. The "include" inside the include tag is the name of the directory that I'm using to test this out.
<?php include('include/navigation/site_navigation.html'); ?>
the other include tags are identical, with the only exception the changed filenames.
Here is the address, if you want to see for yourself. Keep in mind that I haven't even touched the design on this page, I just stuck the includes in a table to see if I could get them to work.
http://www.eriehouse.org/new/
Thanks!
I'm developing a decent-sized site, and I'm looking to use some sort of include for my header, footer, and navigation. I've been doing some research around the net regarding that as well. It seems that there are a couple of options: PHP and SSI. I've done server side includes before, but since I'm hoping to learn PHP, I thought I'd give that a try.
OK, I'm able to get a plain text .txt file to include. My navigation element is an .html file generated by ImageReady (uses javascript). And my header is a plain old .jpg. So I'm having some problems with the navigation and .jpg header.
For the .jpg, I get a parse error. For the navigation, the .html file is parsed, but all of the images are displayed as broken. I am able to load the navigation .html by itself by typing in its address, and it displays correctly.
What might I be doing wrong? Here's the code for the .html navigation. The "include" inside the include tag is the name of the directory that I'm using to test this out.
<?php include('include/navigation/site_navigation.html'); ?>
the other include tags are identical, with the only exception the changed filenames.
Here is the address, if you want to see for yourself. Keep in mind that I haven't even touched the design on this page, I just stuck the includes in a table to see if I could get them to work.
http://www.eriehouse.org/new/
Thanks!
