选择语言 :

 Core_HTML::mailto

Creates an email (mailto:) anchor. Note that the title is not escaped, to allow HTML elements within links (images, etc).

echo HTML::mailto($address);
string Core_HTML::mailto( string $email [, string $title = null , array $attributes = null ] )
uses
HTML::email
HTML::attributes

参数列表

参数 类型 描述 默认值
$email string Email address to send to
$title string Link text null
$attributes array HTML anchor attributes null
返回值
  • string
File: ./core/classes/html.class.php
public static function mailto($email, $title = null, array $attributes = null)
{
    // Obfuscate email address
    $email = HTML::email($email);
    if ($title === null)
    {
        // Use the email address as the title
        $title = $email;
    }
    return '<a href="&#109;&#097;&#105;&#108;&#116;&#111;&#058;' . $email . '"' . HTML::attributes($attributes) . '>' . $title . '</a>';
}