REQUIRE_ONCE AND CLASSES

From: Date: Mon, 16 Dec 2002 16:24:07 +0000
Subject: REQUIRE_ONCE AND CLASSES
Groups: php.general 
Request: Send a blank email to php-general+get-128415@lists.php.net to get a copy of this message
Hi all. I got a problem. When i include a external file using require_once('my_file.php'); in a class file i cant use my_file´s vars and functions. Example: <? require_once "HTML/IT.php"; class Home{ var $tpl_home= new IntegratedTemplate("../templates"); function Home(){ $this->tpl_home->loadTemplatefile("index.tpl.html", true, true); $this->tpl_home->setCurrentBlock("GEREN"); $this->tpl_home->setVariable("GEREN","b"); $this->tpl_home->parseCurrentBlock("GEREN"); $this->tpl_home->setCurrentBlock("PRINCIPAL"); $this->tpl_home->setVariable("DADOS","a"); $this->tpl_home->parseCurrentBlock("PRINCIPAL"); } function show(){ $this->tpl_home->show(); } } $alo=new Home(); $alo->show(); ?> DONT WORK!!! why? im new in php. i will thank any help. sorry my english!!! :) Mauro!

« previous php.general (#128415) next »