Hi All,
Please can somebody help!!! I have a really strange problem with regular expressions.
I've written the following code:
function pre_process_body($arg_body)
{
while(eregi('(.)<\?php (.+)\?>(.)', $arg_body, $arr_body))
{
$php = trim('$tmp = '.$arr_body[2]);
if(substr($php,-1,1) != ';')
{
$php .= ';';
}
eval($php);
$arg_body = $arr_body[1].$tmp.$arr_body[3];
}
return($arg_body);
}
Which works fine on my development box (php 3.0.14) but not on the real web server (php 3.0.18).
Using phpinfo, I can see that my dev box has "Bundled regex library enabled", but the web server has "System regex library enabled".
Does anybody know if this is the problem? Or even what the two lines actually mean?
I'm really stuck on this and could really do with some help.
Thanks,
Alan