473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

including html

I have recently started coding at a new position where I have a
designer that has templates setup. She has different html files that
do different things. Set the doctype, stylesheet, etc. These were
created for server side includes, and works great for html pages, butI
want to include these html files into all of my php pages, and am not
sure the best way to go about it.

I usually create functions for this, but then the designer has to
change the code in the html and the php. Also, in the html where there
is a " I have to change it to \" if I use echo to print it out. Is
there a way that I can include the html in a specific location, not
change or copy the html again, or create a set of functions to include
the html and then when I call that function it?

Jun 21 '07 #1
2 1146
..oO(mtuller)
>I have recently started coding at a new position where I have a
designer that has templates setup. She has different html files that
do different things. Set the doctype, stylesheet, etc. These were
created for server side includes, and works great for html pages, butI
want to include these html files into all of my php pages, and am not
sure the best way to go about it.
Why not simply include them?

include 'head.html';
<?php
doSomething();
?>
include 'foot.html';
>I usually create functions for this, but then the designer has to
change the code in the html and the php. Also, in the html where there
is a " I have to change it to \" if I use echo to print it out.
You can use single-quotes as well, usually there's no need for escaping.

Micha
Jun 21 '07 #2
On Jun 21, 10:56 am, Michael Fesser <neti...@gmx.dewrote:
.oO(mtuller)
I have recently started coding at a new position where I have a
designer that has templates setup. She has different html files that
do different things. Set the doctype, stylesheet, etc. These were
created for server side includes, and works great for html pages, butI
want to include these html files into all of my php pages, and am not
sure the best way to go about it.

Why not simply include them?

include 'head.html';
<?php
doSomething();
?>
include 'foot.html';
I usually create functions for this, but then the designer has to
change the code in the html and the php. Also, in the html where there
is a " I have to change it to \" if I use echo to print it out.

You can use single-quotes as well, usually there's no need for escaping.

Micha
I didn't realize it was that easy. Thanks.

Jun 21 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Orit | last post by:
I am trying to include html file that resides on other server than the main .php file (landing.php), while this server requires user name-password authentication. I tried 2 options while trying:...
18
by: David Johnson | last post by:
I am looking for a way to combine the functionality of "include" and "here documents" so that an included html file containing $variables is expanded and handled (normally printed to stdout). It...
4
by: Husam | last post by:
Hi Every Body: How can I add the .Net Framework to my setup project? any help will be appreciated. Regard's Husam
8
by: Leszek | last post by:
Hi. Could you help solve the problem: i have a file that has two includes: //my script <?php include(.'/prog1.php'); include(.'/prog2.php'); ?>
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
3
by: Mr. Roper | last post by:
I'm pretty weak when it comes to Java script, hopefully someone will take mercy on my sole and explain this to me. How come on the following HTML page, when I have my first script tag commented...
9
by: Arancaytar | last post by:
I have so far seen two methods for including external resources as CSS stylesheets in a document. The first is this: <link href="/stylesheets/style.css" rel="stylesheet" type="text/css" /> And...
9
by: shreedhan | last post by:
Hi all, First of all, I use linux (fedora 6) and apache to host I have a problem of including any file in html while hosting only Even a simple code like <img src="/home/user/abc.jpg" /> ...
10
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
14
by: Andy B | last post by:
I need to create a regular expression that will match a 5 digit number, a space and then anything up to but not including the next closing html tag. Here is an example: <startTag>55555 any...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.