RE: Problems with class and included files
| From: | Eduardo Jordán G. | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | RE: Problems with class and included files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-27267@lists.php.net to get a copy of this message | ||
Hi everybody,
First my apologies. It seems that my e-mail system
sent this message 5 times.
Regarding my problem I forgot to mention that I have
tried without success this:
class FOO
{
.
.
.
function myfoo()
{
global $CONFIG;
print "<HTML>Html stuff $CONFIG[\"config1\"]";
print "more html stuff $CONFIG[\"confign\"]";
}
}
Please any hint?
Please send e-mail directly I USE digest list.
Thank you!!!
-------------------original message----------------------------
Hello Eduardo,
(EJG == ""Eduardo Jordán G."") ejordan@interactive.net.ec
writes:
EJG> Have this class in myclass.php:
EJG> class FOO{
EJG> function FOO()
EJG> {
EJG> }
EJG>
EJG> function myfoo()
EJG> {
EJG> print "<HTML>Html stuff
$CONFIG[\"config1\"]";
EJG> print "more html stuff $CONFIG[\"confign\"]";
EJG> }
EJG> }
class FOO{
function FOO()
{
}
/* one way */
function myfoo($CONFIG)
{
print "<HTML>Html stuff $CONFIG[\"config1\"]";
print "more html stuff $CONFIG[\"confign\"]";
}
}
EJG> All definitions of array $CONFIG are kept in myconf.php
EJG> When I want to use clas FOO in a php file, I go:
EJG>
EJG> include "myconf.php";
EJG> include "myclass.php"
EJG>
EJG> $objFoo = new FOO();
EJG> $objFoo->myfoo();
/* one way */
$obj->myfoo($CONFIG);
http://www.php.net/manual/html/functions.html
http://www.php.net/manual/html/language.references.html
http://www.php.net/manual/html/language.variables.scope.html
EJG> The problems is that array $CONFIG doesn't show any values.
EJG> Please send e-mail directly I use digest list.
EJG>
EJG> Thank you,
Any particular reason you sent this to the list five times?
-Brian
--
Most people find the concept of programming obvious,
but the doing impossible.
-------------------
Eduardo Jordan
Webmaster - Impsat
-------------------------------------------------
Interactive si responde
Este mensaje fue enviado desde:
http://webmail.interactive.net.ec