选择语言 :

 Core_Email::_write_headers

Write Headers as a string

void Core_Email::_write_headers( )
返回值
  • void
File: ./core/classes/email.class.php
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
protected function _write_headers()
{
    if ($this->protocol === 'mail')
    {
        $this->_subject = $this->_headers['Subject'];
        unset($this->_headers['Subject']);
    }
 
    reset($this->_headers);
    $this->_header_str = '';
 
    foreach ($this->_headers as $key => $val)
    {
        $val = trim($val);
 
        if ($val !== '')
        {
            $this->_header_str .= $key.': '.$val.$this->newline;
        }
    }
 
    if ($this->_get_protocol() === 'mail')
    {
        $this->_header_str = rtrim($this->_header_str);
    }
}