php
-
170929_TIL(php 비트 연산자)php 2017. 9. 29. 11:33
개발하면서 > 이런 연산이 어떻게 돌아가는 것인지 이해하기 어려웠다. http://php.net/manual/kr/language.operators.bitwise.php 여기 매뉴얼을 보면서 알게 된것이 > 는 이후 숫자만큼 2씩 나누기 한것 아래는 예제 및 설명이다. Just learning Bitwise Shift Operators. The easiest way to resolve a bitwise shift operators is my multiply or dividing each step by two for left shift or right shift respectively Example: LEFT SHIFT //same as RIGHT SHIFT //same as //Solving on a p..
-
170918_TIL(slim framework 생성)php 2017. 9. 18. 17:32
slim framework 를 사용하기 위해 처음 페이지 들어가서 composer 를 사용해서 스켈레톤 프로젝트를 만들기 위해서는 다음과 같이 실행한다. php composer.phar create-project slim/slim-skeleton [my-app-name] 하지만, 문제가 php 하고 composer.phar 로 하게되면 해당 파일이 없는 것으로 나와서 실행을 할수가 없다. 그럴때는 해당 프로젝트 만들 경로로 가서 다음과 같이 실행하면, php -r "readfile('https://getcomposer.org/installer');" | php composer.phar 파일을 다운 받아서 파일이 생성되는 것을 확인 할 수 있다.