Forum Moderators: coopster
On the web site pages I do the following with SSI:
<!--#set var="Code" value="123" -->
<!--#include virtual="/includes/header.php"-->
The HTML pages are being parsed, however the php script header.php will not pick up the variable:
<?
print "Code: $Code";
?>
outputs "Code:" (variable not passed).
This works on the old server, so I suspect that it is a config issue with php.ini..... my gut feeling is that this is a simple thing I've overlooked but any ideas please help.
Thanks in advance.
I think it may be $_ENV
try this
echo "Code: ", $_ENV['Code'];
see if that works
$_ENV [ca3.php.net]
These variables are imported into PHP's global namespace from the environment under which the PHP parser is running.
I think that's right