为什么这个文件错误class.phpmailer.php?

时间:2011-03-16 02:26:26

标签: php phpmyadmin

消息错误

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in D:\vhosts\vista.com.my\httpdocs\class.phpmailer.php on line 53

class.phpmailer.php

if (version_compare(PHP_VERSION, '5.0.0', '<') ) exit("Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n");

class PHPMailer {

  /////////////////////////////////////////////////
  // PROPERTIES, PUBLIC
  /////////////////////////////////////////////////

  /**
   * Email priority (1 = High, 3 = Normal, 5 = low).
   * @var int
   */
  public $Priority          = 3;                    <!--line 53 is here-->

  /**
   * Sets the CharSet of the message.
   * @var string
   */
  public $CharSet           = 'iso-8859-1';

  /**
   * Sets the Content-type of the message.
   * @var string
   */
  public $ContentType       = 'text/plain';

  /**
   * Sets the Encoding of the message. Options for this are
   *  "8bit", "7bit", "binary", "base64", and "quoted-printable".
   * @var string
   */
  public $Encoding          = '8bit';

2 个答案:

答案 0 :(得分:2)

如果这是错误的正确行号,那么您正在运行PHP 4。

它没有public关键字,因此在运行时检查甚至可以执行任何操作之前,您将得到一个解析错误。

答案 1 :(得分:0)

您永远不会关闭括号class PHPMailer {

在最后添加}