피노 누아 : 프랑스어로 소나무를 뜻하는 피노(Pino)와 검정색을 뜻하는 누아(Noir)가 합쳐진 말.

 

와인~닷컴에서 추천했던 피노누아

조금 알고 먹으면 더 맛나지 않을까 해서 

와인설명 동영상을 보고 구입해봤다.


느낌은 :

맑~고 약간 떫은 맛. 입안에 풍기는 포도향 달콤함, 상큼함도 있었다.

여기서 끝........  알콜 15%.(^_^)



아래 url을 참고하면 이런 내용이 있던데  

와인의 라벨에 쓰여 있는 알코올 함유량을 보아라: 만약 피노 누아 와인의 알코올 함유량이 14.5% 이상이라면 포도가 너무 많이 익었을 때 수확해서 만들었을 가능성이 높다. 이것은 와인이 가지고 있는 맛을 손상시킬 수 있다. 또한 좋은 피노 누아 와인은 균형이 굉장히 중요한데 높은 알코올은 균형을 손상시킬 수도 있다. 따라서 알코올 함유량이 14.5% 이하인 피노 누아 와인을 고르는 것이 좋다.

http://news.chosun.com/site/data/html_dir/2015/07/28/2015072802332.html







'Food > Wine' 카테고리의 다른 글

1865 Single Vineyard Cabernet Sauvignon  (0) 2018.04.28

Composer :  PHP 환경에서 사용하는 의존성 관리 도구

설치 => https://getcomposer.org/download/



C:\Users\Administrator>composer


Composer version 1.6.4 2018-04-13 12:04:24

Usage: command [options] [arguments]

Options:

  -h, --help                     Display this help message

  -q, --quiet                    Do not output any message

  -V, --version                  Display this application version

      --ansi                     Force ANSI output

      --no-ansi                  Disable ANSI output

  -n, --no-interaction           Do not ask any interactive question

      --profile                  Display timing and memory usage information

      --no-plugins               Whether to disable plugins.


c:\APMorg\Apache24\htdocs>composer global require squizlabs/php_codesniffer

Changed current directory to C:/Users/Administrator/AppData/Roaming/Composer

Using version ^3.2 for squizlabs/php_codesniffer

./composer.json has been created

Loading composer repositories with package information

Updating dependencies (including require-dev)

Package operations: 1 install, 0 updates, 0 removals

  - Installing squizlabs/php_codesniffer (3.2.3): Downloading (100%)

Writing lock file

Generating autoload files


c:\APMorg\Apache24\htdocs>



C:\APMorg\Apache24\htdocs>composer require --dev squizlabs/php_codesniffer

Using version ^3.2 for squizlabs/php_codesniffer

./composer.json has been created

Loading composer repositories with package information

Updating dependencies (including require-dev)

Package operations: 1 install, 0 updates, 0 removals

  - Installing squizlabs/php_codesniffer (3.2.3): Loading from cache

Writing lock file

Generating autoload files





vscode-phpcs(composer based)를 적용했더니 
내 코드가 마음에 안드나 보다
30개가 문제있다 나오네...
There must be...
invalid...

phpcs(composer based) 상세 내용은 사용해 보면서 이 글에 업데이트 하는걸로 하겠습니다.




phpcs에서 invalid라 warning하는 건

주석 / 문법오류 / 함수사용시 패턴 / 들여쓰기등을 가이드 해주면서 일괄적인 코딩패턴을 유지할 수 있게 해준다. warning없애려고 하다보니 코드가 깔끔해졌다. => 가독성 좋아짐

참고 ) 주석관련 : https://github.com/squizlabs/PHP_CodeSniffer/issues/258







[fileupload0.php]

html tag enctype="multipart/form-data" 

파일을 업로드 할때 파일속 데이타 모두 encode해서 넘겨야 원본파일을 넘길수 있다. 

그래서 enctype="multipart/form-data" 로 지정해서 넘김.

<form enctype="multipart/form-data" action="fileupload1.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="4000000" />
Send File: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>



[fileupload1.php]

php에서 file upload 시키는 함수는 move_uploaded_file


아래는 업로드시 에러발생했을 경우 에러 메시지를 case별로 적어봤다.

bool move_uploaded_file ( string $Filename , string $Destination )


실제 fileupload0에서 submit되면서 fileupload1으로 넘어올때.

$_FILES 에는 업로드 성공여부(temp폴더에 임시 업로드됨)가 모두 담겨 넘어온다.

그 후 temp폴더에서 "move_uploaded_file" 메소드를 이용 개발자가 정의한 폴더로 move시키는 것이다.


$_FILES info : Array

(

    [userfile] => Array

        (

            [name] => uploaded1.jpg

            [type] => image/jpeg

            [tmp_name] => C:\Windows\Temp\phpFD71.tmp

            [error] => 0

            [size] => 68985

        )

)


<?php

$uploaddir = $_SERVER['DOCUMENT_ROOT']."/admin1/test/img/";

print_r($uploadfile = $uploaddir.basename($_FILES['userfile']['name']));

echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File was successfully uploaded.\n";
} else {
echo "FileUpload was failed.\n";
}

echo 'info:';
print_r($_FILES);
echo "<br />";

if(UPLOAD_ERR_OK !=$_FILES['userfile']['error'])
{

switch ($_FILES['userfile']['error']) {
case UPLOAD_ERR_INI_SIZE:
$message = "The uploaded file exceeds the upload_max_filesize directive in php.ini";
break;
case UPLOAD_ERR_FORM_SIZE:
$message = "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form";
break;
case UPLOAD_ERR_PARTIAL:
$message = "The uploaded file was only partially uploaded";
break;
case UPLOAD_ERR_NO_FILE:
$message = "No file was uploaded";
break;
case UPLOAD_ERR_NO_TMP_DIR:
$message = "Missing a temporary folder";
break;
case UPLOAD_ERR_CANT_WRITE:
$message = "Failed to write file to disk";
break;
case UPLOAD_ERR_EXTENSION:
$message = "File upload stopped by extension";
break;
default:
$message = "Unknown upload error";
break;
}

echo $message;

}
print "</pre>";
?>


자 이렇게 해서 fileupload0.php => fileupload1.php 순서로 실행되면 

아래의 로그를 받아볼 수 있다.

화일은 temp로 임시 저장된 후 다시 최초 지정한 경로로 옮겨간다. 

'프로그래밍 > PHP' 카테고리의 다른 글

unlink(=delete) 메소드 이용하기  (0) 2018.04.22
directory entry 읽어 파일리스트업  (0) 2018.04.20
fileupload 에러메시지 설명  (0) 2018.04.14
angularJS 사용하기  (0) 2018.04.01
json 데이타 사용하기  (0) 2018.03.28

+ Recent posts