«   2018/01   »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Archives
Today
415
Total
1,047,156
관리 메뉴

Blue Breeze

CI hwp 파일 업로드 (unknown file extension upload), 다운로드 본문

Framework/PHP-CodeIgniter

CI hwp 파일 업로드 (unknown file extension upload), 다운로드

푸른바람 푸른_바람 2016.07.02 01:57

unknown file extension upload

// CI2, CI3 : application/config/mimes.php Add MIME type
	'hwp'   => Array('application/unknown', 'text/plain')

// CI 2.2.6 : system/libraries/Upload.php Modify
	public function mimes_types($mime)
	{
		global $mimes;

		if (count($this->mimes) == 0)
		{
			if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
			{
				// include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
				$mimes = include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
			}
			elseif (is_file(APPPATH.'config/mimes.php'))
			{
				// include(APPPATH.'config/mimes.php');
				$mimes = include(APPPATH.'config/mimes.php');
			}
			else
			{
				return FALSE;
			}

			$this->mimes = $mimes;
			unset($mimes);
		}

		return ( ! isset($this->mimes[$mime])) ? FALSE : $this->mimes[$mime];
	}


0 Comments
댓글쓰기 폼