|
Posted by milahu on 11/19/68 11:45
Hope this works...
<?php
function loadPreferencesAuto()
{
// init gzip buffer
ob_start('ob_gzhandler');
// read file
$content = file_get_contents($dir.'preferences_auto.html');
// do replacements
$content = preg_replace_callback(
'/$LABEL\{\'(\w+)\'\}/', // ?
create_function(
'$matches',
'return isset($_SERVER[$matches[0]]) ? $_SERVER[$matches[0]] :
$matches[0];'
),
$content
);
$content = str_replace('$LANG', $lang, $content);
$content = preg_replace('$ERROR\{\'(\w+)\'\}', '', $content);
$content = str_replace('$SESSIONID', $session_id, $content);
}
?>
[Back to original message]
|