可以用<! - 替换example.com。 php echo BASE_URL; ? - >?

时间:2016-06-21 13:11:33

标签: php codeigniter-3

标头可以用<? php echo BASE_URL; ?>替换example.com吗?

<form action="" method="post">
<input type="submit" value="Send details to embassy" />
<input type="hidden" name="button_pressed" value="1" />
</form>
<?php 
if(isset($_POST['button_pressed']))
{
$to      = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
echo 'Email Sent.';
}
?>

我尝试使联系表格动态化;)

0 个答案:

没有答案