Categories > TinyButStrong general >

pulling php from other files

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: joe
Date: 2007-05-15
Time: 00:31

pulling php from other files

hi is it possible to take php code from other files into the template? as in the manual for data sources i found this:
TinyButStrong supports several data source types in native:
Php data: an array, a string, a number.
Databases: MySQL ; PostgreSQL ; SQLite.
You can also add a new one: 'database plug-ins'.

so does this mean i cant take code from other php files?
By: Skrol29
Date: 2007-05-15
Time: 01:03

Re: pulling php from other files

Hi,

You cannot take the code from another PHP script (actually you can, but it won"t be executed), but you can take the result of a another PHP script.
See parameter "script".
By: joe
Date: 2007-05-15
Time: 02:35

Re: pulling php from other files

this one right?

file=filename Replace the field with the contents of the file. Filename can be a string or an expression built with [var] fields that returns the file path.
If the file is not found, then it will also be searched in the folder of the last loaded template (since TBS version 3.2.0).
How to use this parameter is detailed in the chapter Subtemplates.
See also: getbody script