2017-03-08 6 views
1

에 업로드 할 수 변경 파일 크기를 도움이 필요, 그것은 나에게 오류를 제공합니다 소진 67,108,864 바이트의 허용 메모리 크기 (할당하려고 : 내가 내 업로드 양식에 파일을 첨부 할 때 첨부 양식

치명적인 오류가

26990378 바이트) in /home/content/j/o/h/johnmunro/html/upload/include/class.phpmailer.php 1238

여기 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; 

}

답변

0

오류는 PHP를 실행하는 데 더 많은 메모리를 필요로한다는 것을 의미한다.

PHP에 할당 된 메모리 크기를 늘리려면 다음을 호출해야합니다. ini_set ('memory_limit', '256M'); 귀하의 스크립트를 시작할 때 (선호). 필요한 메모리 양을 256으로 바꾸십시오.

UPDATE

이 PHP를 실행하는 메모리의 방대한 양을 필요로하지 않습니다, 그래서 당신은 또한 메모리 최적화 기술에 작동합니다.

통과하십시오 :

팁 메모리가 부족 방지 : http://v1.srcnix.com/2010/02/10/7-tips-to-prevent-php-running-out-of-memory/

PHP의 메모리 및 성능 수동 : 내 문제를 해결해야 코드의 http://php.net/manual/en/features.gc.performance-considerations.php

+0

그래서 작은 문자열을? 다른 일은 할 필요가 없다. 내가 필요로하는 링크를 당신이 제공해야하는 것은 무엇입니까? –

+0

어떤 이유로 든이 오류가 발생했습니다 : 구문 분석 오류 : 구문 오류, 예기치 않은 ':'/home/content/j/o/h/johnmunro/html/upload/include/fgcontactform.php 온라인 30 –

+0

공유하십시오 오류가 발생합니다. 메시지 코드 등 –