I'm using this code to convert urls:
// Find e-mail addresses and add a mailto <a href> tag.
$str = preg_replace("/(\w|\-|\.)+@(\w|\-)+(\.|(\w|\-)+)+/", "<a href=\"mailto:$0\">$0</a>", $str);
// Find URLs (starting with http or https) and add a <a href> tag.
$str = preg_replace("/http?\:\/\/\S+/", "<a href=\"$0\">$0</a>", $str);
Works fine on my Win95 and Unix (ISP hosted) Apache servers, but on a separate Win98 Apache setup, all I get is:
<a href="$0">$0</a>
Using the same versions of PHP, MySQL and Apache on all three locations. Have checked my PHP.ini line by line, and can see nothing to cause this failure. Any ideas?
// Find e-mail addresses and add a mailto <a href> tag.
$str = preg_replace("/(\w|\-|\.)+@(\w|\-)+(\.|(\w|\-)+)+/", "<a href=\"mailto:$0\">$0</a>", $str);
// Find URLs (starting with http or https) and add a <a href> tag.
$str = preg_replace("/http
Works fine on my Win95 and Unix (ISP hosted) Apache servers, but on a separate Win98 Apache setup, all I get is:
<a href="$0">$0</a>
Using the same versions of PHP, MySQL and Apache on all three locations. Have checked my PHP.ini line by line, and can see nothing to cause this failure. Any ideas?