Menu

#6 Another improvement for TInclude

open-later
None
5
2001-08-13
2001-08-08
No

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

Discussion

  • Gaspar Chilingarov

    • assigned_to: nobody --> nightmar
     
  • Gaspar Chilingarov

    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

     
  • Gaspar Chilingarov

    • status: open --> open-later
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.