这一行是什么意思:
$fields = explode("\r\n", preg_replace('/\x0D\x0A[\x09\x20]+/', ' ', $header));
我从这个答案中得到了cURL , get redirect url to a variable
答案 0 :(得分:1)
preg_replace
将展开电子邮件header lines that are split across multiple lines。然后explode
调用将结果字符串拆分为一个数组,每个数组单元有一个标题行。
例如,字符串:
Subject: This is a long subject
line split across
multiple lines
From: user@example.com
将由preg_replace
转换为:
Subject: This is a long subject line split across multiple lines
From: user@example.com
以下explode
会给您:
Array(
[0] => 'Subject: This is a long subject line split across multiple lines',
[1] => 'From: user@example.com'
)