Zum Inhalt springen

TEMPLATE with PHP code

Erstellt am 26. Februar 2004 · 2 Antworten · letzte Antwort am 11. März 2004

Tags: Frage, English

vanea ·

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>

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

TW ·

hi
just trie this........

put this into your setup code field...

tt_content.script = CASE
tt_content.script {
key.field = select_key
test = PHP_SCRIPT_EXT
test.file = fileadmin/mysrcipt.php
}

and now make an new side content
change field Typ=Text to
TYP=Script

and write in the CODE field
mysrcipt

and you get it!

btw: delete the markers in your html template

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

you don't need them..

cu
thorsten

c4c ·
TW schrieb

test = PHP_SCRIPT_EXT
test.file = fileadmin/mysrcipt.php

..
..
..

and write in the CODE field

mysrcipt <- .. isn't it "test" in this case?

grEEz
stEvo

[/b]