|
Posted by Jochem Maas on 10/17/46 11:30
Christoph Freundl wrote:
> 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.
>
I just looked at apache_getenv():
string apache_getenv ( string variable [, bool walk_to_top] )
the second arg maybe something to consider?
also does getenv() [http://php.net/getenv] have the same problems?
>
> 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?
I would say yes because virtual() create a sub-process, with it _own_ env.
>
> Regards, Christoph
>
Navigation:
[Reply to this message]
|