Re: Mixed PHP/SSI and environment variables
| From: | Christoph Freundl | Date: | Fri, 28 Oct 2005 14:36:27 +0000 |
| Subject: | Re: Mixed PHP/SSI and environment variables | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-224777@lists.php.net to get a copy of this message | ||
Am Freitag, 28. Oktober 2005 13:42 schrieb Jochem Maas:
> ok, and if you stick the following in 1 file and call it?:
>
> <!--#set var="myvar" value="myval" -->
> <?php echo apache_getenv( "myvar" ); ?>
>
> ... just thinking out loud here.
Ok, I tried this by configuring Apache such that .php-files are also
parsed for Server Side Includes and wrote it the way you suggest. Now
I am really confused: the SSI statements are obviously recognized
because they do not appear in the resulting file but
a) apache_getenv does still not return the value for the variable but
b) if I call phpinfo() instead of apache_getenv the variable "myvar"
plus the set value is shown correctly in the "Apache Environment" and
c) an SSI "<!--#echo var="myvar" --> after the php block also gives the
correct value
Perhaps I return to what I primarily intended to ask: is it really the
wanted behaviour of virtual() that changes that are made by the
included file do not influence the environment of the including file?
Regards, Christoph
--
Christoph Freundl http://www10.informatik.uni-erlangen.de/~chfreund/
Lehrstuhl für Systemsimulation (Inf. 10), Cauerstr. 6, D-91058 Erlangen
Tel: +49-9131-85-28676 | A low voter turnout is an indication of fewer
Fax: +49-9131-85-28928 | people going to the polls. - D. Quayle