选择语言 :

 Core_Text::auto_link

Converts text email addresses and anchors into links. Existing links will not be altered.

echo Text::auto_link($text);

This method is not foolproof since it uses regex to parse HTML.
string Core_Text::auto_link( string $text )
uses
Text::auto_link_urls
Text::auto_link_emails

参数列表

参数 类型 描述 默认值
$text string Text to auto link
返回值
  • string
File: ./core/classes/text.class.php
public static function auto_link($text)
{
    // Auto link emails first to prevent problems with "www.domain.com@example.com"
    return Text::auto_link_urls(Text::auto_link_emails($text));
}