【问题标题】:PHP mail error ... failed to open stream : permission deniedPHP 邮件错误...无法打开流:权限被拒绝
【发布时间】:2009-07-31 06:15:08
【问题描述】:

我正在尝试使用 PHP 邮件发送电子邮件。我收到以下错误:

警告:未知:无法打开流:第 0 行的未知中的权限被拒绝

致命错误:未知:无法在第 0 行的未知中打开所需的“/home/webtest/help/ask_us.php”(include_path='.:/usr/share/php:/usr/share/pear')

PHP代码如下:

<?php
  $name = $_REQUEST['name'] ;
  $email = $_REQUEST['email'] ;
  $subject = $_REQUEST['subject'] ; 
  $message = $_REQUEST['message'] ;

  mail( "myemail@myhost.com", "Subject header",
    $message, "From: $email" );
  header( "Location: http://www.google.com" );
?>

【问题讨论】:

标签: php email stream


【解决方案1】:

该消息不是邮件错误。 PHP 无法打开文件 ask_us.php。如果 ask_us.php 是您的文件,请检查其权限(以及父文件夹的权限)。

【讨论】:

    猜你喜欢
    • 2010-12-26
    • 2015-11-15
    • 1970-01-01
    • 1970-01-01
    • 2010-11-14
    • 2014-10-28
    • 2016-02-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多