Page 1 of 1

Vars with curly brakets don't work

Posted: Wed Nov 08, 2006 7:55 am
by amir
I've just installed a program on my server that is using variables with curly brakets, here is some code from it:

Code: Select all

require_once( "inc/header.inc.php" );
require_once( "{$dir['inc']}design.inc.php" );

include( "{$dir['root']}templates/tmpl_{$tmpl}/scripts/index.php" );
the $dir is defined in header.inc.php, if I just echo right under the first line I get the value of the variable, however anything below {} does not work. Is it something in php.ini that needs to be changed?

Thanks,

Posted: Wed Nov 08, 2006 9:26 am
by volka
No, there's no config parameter that allows or disallows "..{$var}.."

Re: Vars with curly brakets don't work

Posted: Wed Nov 08, 2006 9:29 am
by jmut
amir wrote:I've just installed a program on my server that is using variables with curly brakets, here is some code from it:

Code: Select all

require_once( "inc/header.inc.php" );
require_once( "{$dir['inc']}design.inc.php" );

include( "{$dir['root']}templates/tmpl_{$tmpl}/scripts/index.php" );
the $dir is defined in header.inc.php, if I just echo right under the first line I get the value of the variable, however anything below {} does not work. Is it something in php.ini that needs to be changed?

Thanks,
and what is the problem.......if display_errors = on and error_reporting(E_ALL) says nothing...and your files are still not included...then..yes you can say curly braces doesn't work