Re: pc/mac and ie/nav
| From: | richard greene | Date: | Thu, 28 Jun 2001 14:01:36 +0000 |
| Subject: | Re: pc/mac and ie/nav | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55491@lists.php.net to get a copy of this message | ||
Hello all,
Can anyone see what's happening here?
I'm trying to pass some variables (font stuff) to a cgi script so that it
will appear the same as the current theme being used.
Everything seems to be working except the replacements. here's the code. Any
help much appreaciated, thanks!
Or would there be a better way to do this?
<?php
include("/path_to/preload.php");
include($header_forum_prog);
$out = implode("\n",
file("http://domain.com/path_to/forum.pl$QUERY_STRING"));
preg_match_all("/PHP?([^?]+)?PHP/", $out, $matches, PREG_PATTERN_ORDER);
for($i=0; $i < count($matches[1]); $i++){
$out = str_replace("PHP?".$matches[1][$i]."?PHP", $$matches[1][$i], $out);
}
echo $out;
include($footer_prog);
?>
and the variable in the cgi script are
var heading_bgcolor = \"PHP?$bgcolor?PHP\"
var heading_font = \"PHP?$ThemeFont?PHP\"
but eh variable from the php globals are $bgcolor, $ThemeFont
Thanks
Richard