array_fill function 관하여 > 그누3질답

그누3질답

array_fill function 관하여 정보

그누보드 array_fill function 관하여

본문

홈페이지를 보름정도 비운사이에 이런 현상이 나타나고 있습니다.

Fatal error: Cannot redeclare array_fill() in /home1/e6e3/public_html/gboard/bbs/skin/board/h_diary/calendar.php on line 84

// For PHP version < 4.2.0 missing the array_fill function,
// I provide here an alternative. -Philippe

function array_fill($iStart, $iLen, $vValue) {
  $aResult = array();
  for ($iCount = $iStart; $iCount < $iLen + $iStart; $iCount++) {
      $aResult[$iCount] = $vValue;
  }
  return $aResult;
}

계정을 확인결과
PHP 4.3.10 (Zend Optimizer 2.5.7)
입니다.

왜 그렇까요?
패치는 3.41까지 했습니다.
  • 복사

댓글 전체

redeclare  ... 똑같은 함수를 2번 정의 하려고 할때 나와요...

위에 코드는 php.net 메뉴얼에 있는거네요..  php 메뉴얼에 있는...
if (!function_exists('array_fill')) {
  require_once('array_fill.func.php');
}
이곳 관련부분이 빠져서 그런거 같은데요...
4.3.10 이니 아예 빼면 될듯 한데요...
© SIRSOFT
현재 페이지 제일 처음으로