我使用一些代码来将url转换为使用php的工作链接。CSS类不会在链接上设置预期颜色
但css类我使用不工作时的URL以*。html的
的PHP似乎很好地工作,但给更多的信息,我将它张贴在这里结束:
// turn http urls into working links
$message = eregi_replace('(((f|ht){1}tp://)[[email protected]:%_\+.~#?&//=]+)','<a href=\'\\1\' class=\'topicurl\' target=\'_blank\'>\\1</a>', $message);
CSS的似乎也做工精细的大部分时间:
a.topicurl:link {
color:#cd4f12;
}
这里什么错误的截图:
http://img149.imageshack.us/img149/5305/csstrouble.jpg
什么浏览器?所有浏览器?我们能否看到实际的标记(因为这实际上很重要)? – 2010-12-06 14:41:41
[`eregi_replace()`](http://php.net/eregi_replace)已弃用。你可能想切换到PCRE。 – jwueller 2010-12-06 14:45:01