Php 需要帮助更改允许在附件表单上上载的文件大小吗

Php 需要帮助更改允许在附件表单上上载的文件大小吗,php,forms,attachment,email-attachments,Php,Forms,Attachment,Email Attachments,当我尝试将文件附加到上载表单时,会出现以下错误: 致命错误:第1238行的/home/content/j/o/h/johnmurro/html/upload/include/class.phpmailer.php中允许的内存大小为67108864字节(尝试分配26990378字节) 这是1238上的一行代码,显然是它导致了这个问题。有人能帮我吗 /** * Encodes string to requested format. Returns an * empty string on fail

当我尝试将文件附加到上载表单时,会出现以下错误:

致命错误:第1238行的/home/content/j/o/h/johnmurro/html/upload/include/class.phpmailer.php中允许的内存大小为67108864字节(尝试分配26990378字节)

这是1238上的一行代码,显然是它导致了这个问题。有人能帮我吗

 /**
* Encodes string to requested format. Returns an
* empty string on failure.
* @access private
* @return string
*/
function EncodeString ($str, $encoding = 'base64') {
$encoded = '';
switch(strtolower($encoding)) {
  case 'base64':
    /* chunk_split is found in PHP >= 3.0.6 */
    $encoded = chunk_split(base64_encode($str), 76, $this->LE);
    break;
  case '7bit':
  case '8bit':
    $encoded = $this->FixEOL($str);
    if (substr($encoded, -(strlen($this->LE))) != $this->LE)
      $encoded .= $this->LE;
    break;
  case 'binary':
    $encoded = $str;
    break;
  case 'quoted-printable':
    $encoded = $this->EncodeQP($str);
    break;
  default:
    $this->SetError($this->Lang('encoding') . $encoding);
    break;
}
return $encoded;

}该错误意味着php需要更多内存才能运行

要增加分配给php的内存大小,必须调用: ini_集('memory_limit','256M') 在脚本开始时(最好)。 将256替换为所需的内存量

更新

您还应该研究内存优化技术,以便php不需要大量内存来执行

请通过:

防止内存不足的提示:

PHP内存和性能手册:
该错误意味着php需要更多内存才能运行

要增加分配给php的内存大小,必须调用: ini_集('memory_limit','256M') 在脚本开始时(最好)。 将256替换为所需的内存量

更新

您还应该研究内存优化技术,以便php不需要大量内存来执行

请通过:

防止内存不足的提示:

PHP内存和性能手册:

这样一小串代码就可以解决我的问题了?没有必要做其他事情吗?如果我需要更多,我需要你提供的链接吗?出于某种原因,它给了我这个错误:解析错误:语法错误,意外“:”in/home/content/j/o/h/johnmurro/html/upload/include/fgcontactform.php第30行请分享错误详情。i、 e消息代码etcso这一串小代码应该可以解决我的问题吗?没有必要做其他事情吗?如果我需要更多,我需要你提供的链接吗?出于某种原因,它给了我这个错误:解析错误:语法错误,意外“:”in/home/content/j/o/h/johnmurro/html/upload/include/fgcontactform.php第30行请分享错误详情。i、 电子邮件代码等