Tech Support Guy banner
Status
Not open for further replies.

Solved: Using layout for multiple pages

1K views 4 replies 3 participants last post by  luineril 
#1 ·
I was wondering if there is some way to import HTML code into different pages? I'm working on a layout right now and it uses a lot of tables. Because the same layout is going to be used for many different pages, I was wondering if there was some way to keep the text in an external file, then import it into each different page. I don't want to get into using iframes because in past experiences they've been a bit finicky. I guess that if worse comes to worse, I can try to use CSS for everything, but if there is a way to import code I'd like to know it.

Thanks for taking the time to read!
 
#2 ·
Hi,

If you are using dreamweaver you can create templates and then you will be able to import the common HTML code in which all pages you need.

Otherwise if you are going to use PHP or ASP or ASP.NET or any other scripting language then you can create include files to store the HTML that needs to be repeated in various pages.

Hope this helps!

Cheers,

~Maneet
LeXolution IT Services
Web Design Services
 
#3 ·
I'm not using Dreamweaver, so I guess it's time for some PHP! Thanks for the advice.

I actually tried some simple PHP out last night (Hello world!), but I couldn't get anything to show up on the pages. I think that the problem is that nothing's actually online yet - I'm just testing the pages from my computer. Would that mess things up, or am I just getting the code wrong?
 
#4 ·
I'm not using Dreamweaver, so I guess it's time for some PHP! Thanks for the advice.

I actually tried some simple PHP out last night (Hello world!), but I couldn't get anything to show up on the pages. I think that the problem is that nothing's actually online yet - I'm just testing the pages from my computer. Would that mess things up, or am I just getting the code wrong?
PHP is processed by a server, and then outputted to the browser in the form of text and html. To test PHP code on your home computer (if you're using Windows), you'll need two things.

1, A server on your computer.
2, PHP installed on the server.

Or you could just upload the files to your website everytime you wanna test them, and have your host's server read the PHP.
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top