나는이 문서 주위에 많은 문서가 있지만이 한 줄의 코드는 나에게 4000 줄짜리 파일을 찾기 위해 오래 걸렸으므로 처음 시도해보고 싶다. 나는 기본적으로 $email['headers']
배열에어떻게 새 키 값 쌍을 배열 PHP에 푸시합니까?
'BCC' => '[email protected]'
에 추가 할 if 문이 후
file_put_contents($myFile,serialize(array($email_number,$email_address))) or die("can't open file");
if ($address != "[email protected]") {
$email['headers'] = array('CC' => '[email protected]');
}
}
는 (그래서 여부를 추가하는 경우 평가 사실 여부를)
다음을 참조하십시오. 배열 객체를 만들고 배열에 값을 할당하십시오. http://hiox.org/33288-create-array-copy-using-php.php – Vaishu
if 문 내부의 줄은 '최고의'방식이 아니기 때문에 (나는 정말로 모른다) 작동 할 것이다. $ email [ 'headers'] = 배열 ('BCC'=> '[email protected]'); – Jake