Another improvement for TInclude
Brought to you by:
nightmar
Hi,
A new improvement for the TInclude.php
Now you can set the 'path' property.
class TInclude extends TObject {
var $filename;
var $path;
function on_output($val)
{
if (empty($val))
$val = $this->filename;
if (isset($this->path))
include "$this->path/$val";
else
include "$val";
}
function SInclude($var=0, $path=0)
{
if (!empty($var))
$this->filename = $var;
if (!empty($path))
$this->path = $path;
}
function SetPath($path)
{
$this->path = $path;
}
}
Greetings,
Steven
Logged In: YES
user_id=20783
it may cause mess ... i'm thinking over now ...
any ideas , how this can be used ? putting all html snippets into some dir , and after this passing their file names into template ?
i think the separate class is better solution for this