Your webserver is configured for development mode which means you can easily see the error (or at least I'm seing it)..
Parse error: syntax error, unexpected '<' in E:\vhosts\buskelundtoften.dk\httpdocs\vejret\1test.php on line 12
Not sure what you are really trying to do in this code...
<?php
function html_start() {
include("vejrdata/testtags.php");
$TITLE = "Page title to display";
$CURPAGE = basename( $_SERVER['PHP_SELF'] );
include("1HTML_top.php");
include("1top.php");
$doInclude = true;
include("1menu.php");
}
<div id="main-copy">
<h1 id="radar">TEST</h1>
Here is the main text.
</div>
$doInclude = true;
include("1bundtekst.php");
?>
The error is due to the line:
<div id="main-copy">
Because you start out in PHP mode, but then switch to HTML mode without telling the server you are doing so. However, I'm not sure what you are doing with the function, since you are not actually calling it.
You have to think of PHP code inside a web page as being switched on <?php and switched off ?>.
When it is on, you are in PHP mode so what you enter is PHP code, NOT HTML code. When it is switched off, you are then back to native HTML mode.
In PHP mode you can output HTML by using print, or echo like:
echo '<table><tr><td>Apples</td><td>Pears</td><td>Plumbs</td></tr></table>';
You can insert PHP code while in HTML mode by simply switching like:
<?php
$TITLE="1234"
?>
<h1><?php echo $TITLE; ?></h1>
...
Which started in PHP mode, set the Variable $TITLE, switched to HTML mode and then echo'd the variable in PHP between the two HTML <h1> tags...
So, back to your code segment.... You could do it like the following (I give you several variations of the same thing to show there are options on how to do the same thing)...
Dont use the function at all and use echo to output the HTML:
<?php
include("vejrdata/testtags.php");
$TITLE = "Page title to display";
$CURPAGE = basename( $_SERVER['PHP_SELF'] );
include("1HTML_top.php");
include("1top.php");
$doInclude = true;
include("1menu.php");
echo '<div id="main-copy">
<h1 id="radar">TEST</h1>
Here is the main text.
</div>';
$doInclude = true;
include("1bundtekst.php");
...
Or... Dont use the function and switch to HTML mode to output the small amount of HTML
<?php
include("vejrdata/testtags.php");
$TITLE = "Page title to display";
$CURPAGE = basename( $_SERVER['PHP_SELF'] );
include("1HTML_top.php");
include("1top.php");
$doInclude = true;
include("1menu.php");
?>
<div id="main-copy">
<h1 id="radar">TEST</h1>
Here is the main text.
</div>
<?php
$doInclude = true;
include("1bundtekst.php");
...
Or... Use the function, but then you need to call it...
<?php
function html_start() {
include("vejrdata/testtags.php");
$TITLE = "Page title to display";
$CURPAGE = basename( $_SERVER['PHP_SELF'] );
include("1HTML_top.php");
include("1top.php");
$doInclude = true;
include("1menu.php");
}
html_start();
<?
<div id="main-copy">
<h1 id="radar">TEST</h1>
Here is the main text.
</div>
<?php
$doInclude = true;
include("1bundtekst.php");
...
Hopefully that will give you some ideas of how you can do it.