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? 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
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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:...
|
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...
|
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
|
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');
?>
|
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...
|
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...
|
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...
|
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" /> ...
|
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...
|
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...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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
|
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...
|
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,...
|
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...
|
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,...
| |