Categories > TinyButStrong general >

Making a script with PHP segment in tempalte file work

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Sn
Date: 2013-08-18
Time: 14:02

Making a script with PHP segment in tempalte file work

Hello,
I am having problem with making an HTML template work. It contains a PHP segment:

var time = '<?php print date("F d, Y H:i:s", time())?>'

Now, in the interplay between TBS processing and this PHP in HTML page, the PHP part is not getting processed. Could you suggest a way out please, keeping in view that date is a dynamic quantity.

TIA,
Sn
By: Sn
Date: 2013-08-19
Time: 04:29

Re: Making a script with PHP segment in tempalte file work

Luckily there was a shortcut.

        var currenttime = '[onshow..now;frm='mmmm dd, yyyy hh:nn:ss']'


By: Skrol29
Date: 2013-08-21
Time: 01:26

Re: Making a script with PHP segment in tempalte file work

Hi Sn,

The main purpose of a template engine is to separate the coding and the design.
Thus, any PHP code won't be process in the template.
By: Sn
Date: 2013-08-23
Time: 09:13

Re: Making a script with PHP segment in tempalte file work

Thanks Skrol29.
I figured there are other round about solutions too. Like directly sending from PHP the relevant stuff as variables.

Does SSI work with TBS?

By: Skrol29
Date: 2013-08-25
Time: 23:24

Re: Making a script with PHP segment in tempalte file work

> Does SSI work with TBS?

What is SSI ?