[TYPO3] How to include PHP scripts on a page?
Denis Bilodeau
denis at ubitext.com
Sun Jan 6 02:20:13 CET 2008
Thanks for the help,
There was this other suggestion to build an extension. I rather think
that PHP_SCRIPT_EXT exists precisely for my purpose, since what I want
to do depends on local files on a server and cannot be generalized.
I tried this on the template -ext: Main TEMPLATE cObject
tempTs = PHP_SCRIPT_EXT
tempTs.file = fileadmin/template/flagstatus.inc
with this on the template -ext: Menu_1
subparts.flag_cucbc < tempTs
and this on the HTML template where I need the flagstatus text to appear:
<!--###flag_cucbc### begin-->flag status<!--###flag_cucbc### end-->
But nothing happens. I have tested my PHP file by itself and it returns
the info I want. Anybody sees what I am missing?
Bartosz Aninowski wrote:
>> I need to put some script on a page to retrieve sunrise and sunset time
>> from a file (I have some bits of code ready for that). But I am having
>> trouble at the "Hello World" level (ahem...): how to include a personal
>> PHP script in Typo3?
>>
>> The '<?php' bit is stripped if I put the code directly on the template or
>> in a text element. Should I try to set some user TS to allow it or is
>> there a better method?
>
> tempTs = PHP_SCRIPT_EXT
> tempTs.file = fileadmin/zone.inc
> page.100 < tempTs
>
> look for PHP_SCRIPT_EXT in documentation
>
>
More information about the TYPO3-english
mailing list