---
title: "TEMPLATE with PHP code"
url: "https://www.typo3.net/d/9408-template-with-php-code"
source: "typo3.net"
tags: ["Backend","Benutzer & Rechte","English","Frage"]
created: "2004-02-26"
last_reply: "2004-02-26"
replies: 1
solved: false
page: 1
pages: 1
lang: "en"
---

# TEMPLATE with PHP code

Backend › Benutzer & Rechte · 1 Antwort · gestartet 2004-02-26

## Eröffnungsbeitrag

**vanea** · 2004-02-26 · [Beitrag #1](https://www.typo3.net/d/9408-template-with-php-code/1)

I have this template....in indx.html file
My site is based on this one....

MENU is for left menu, which is created from page structure
CONTENT is content of pages when a menu is clicked

instead of MYPHP I want the content returned by ECHO from my own php script which is in inc/myscript.php

**HOW TO DO THAT ?**

file /inc/myscript.php
----------------------
<?
   echo "hello from myscript.php";
?>
---------------------

file index.html (template)
-------------------------

<HTML><HEAD><TITLE>Welcome</TITLE>
<BODY>
<!--###DOCUMENT_BODY###  start-->

<TABLE>
<TR>
    <TD>
	    <!--###MENU###  start-->
	    <!--###MENU###  stop-->
    </TD>

    <TD>
	    <!--###CONTENT###  start-->
	    <!--###CONTENT###  stop-->
    </TD>
</TR>
</TABLE>

<!--###MYPHP###  start-->
<!--###MYPHP###  stop-->

<!--###DOCUMENT_BODY###  stop-->

</BODY>
</HTML>

----------------------------

## Antworten

### [#2](https://www.typo3.net/d/9408-template-with-php-code/2) · TW · 2004-02-26

> **vanea schrieb:**
>
> I have this template....in indx.html file
> My site is based on this one....
>
> MENU is for left menu, which is created from page structure
> CONTENT is content of pages when a menu is clicked
>
> instead of MYPHP I want the content returned by ECHO from my own php script which is in inc/myscript.php
>
> **HOW TO DO THAT ?**
>
> file /inc/myscript.php
> ----------------------
> <?
>    echo "hello from myscript.php";
> ?>
> ---------------------
>
> file index.html (template)
> -------------------------
>
> <HTML><HEAD><TITLE>Welcome</TITLE>
> <BODY>
> <!--###DOCUMENT_BODY###  start-->
>
> <TABLE>
> <TR>
>     <TD>
> 	    <!--###MENU###  start-->
> 	    <!--###MENU###  stop-->
>     </TD>
>
>     <TD>
> 	    <!--###CONTENT###  start-->
> 	    <!--###CONTENT###  stop-->
>     </TD>
> </TR>
> </TABLE>
>
> <!--###MYPHP###  start-->
> <!--###MYPHP###  stop-->
>
> <!--###DOCUMENT_BODY###  stop-->
>
> </BODY>
> </HTML>
>
> ----------------------------

hey

it's the wrong range for this question.
use the link...

[/d/9409-template-with-php-code](https://www.typo3.net/d/9409-template-with-php-code)

and that's it!

cu
thorsten

---

Quelle: „TEMPLATE with PHP code“, typo3.net, https://www.typo3.net/d/9408-template-with-php-code
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
