【发布时间】:2016-06-14 07:37:27
【问题描述】:
警告:邮件(/home/u295560656/.logs/php_mail.log):无法打开流:第 9 行的 /home/u295560656/public_html/2.php 中没有此类文件或目录 已发送测试电子邮件
这个错误是怎么回事?以前我可以发送邮件,但现在不能使用 Hostinger 托管服务。
这是我的代码:
<?php
ini_set( 'display_errors', 1 );
error_reporting( E_ALL );
$from = "smthing@gmail.com";
$to = "smthing_else@gmail.com";
$subject = "PHP Mail Test script";
$message = "This is a test to check the PHP Mail functionality";
$headers = "From:" . $from;
mail($to,$subject,$message, $headers);
echo "Test email sent";
?>
【问题讨论】:
标签: php email warnings phpmailer