php
-
codeigniter 프로젝트 생성php 2023. 8. 9. 17:12
1. codeigniter 다운로드 https://packagist.org/ =8.2"" data-og-host="packagist.org" data-og-source-url="https://packagist.org/" data-og-url="https://packagist.org/" data-og-image=""> Packagist Define Your Package Put a file named composer.json at the root of your package's repository, containing this information: { "name": "your-vendor-name/package-name", "description": "A short description of what y..
-
php의 Composer 활용하기php 2023. 8. 9. 17:03
1. composer가 다운받아져 있는지 확인할 수 있다. 2. composer가 다운로드 되어있다면, composer를 생성하고싶은 폴더에서 다음의 명령어를 실행한다. - 이용하고자 하는 확장 프로그램 (라이브러리)을 입력하고 버전 및 사용자 이름, 도메인 주소를 입력하면 composer.json 파일을 얻을 수 있고 - 이어서 설정된 dependencies를 설치하면 dependencies를 활용할 수 있게 설치된 composer.lock 파일이 생성된다. - 설치한 symfony의 var-dumper를 사용하면 다음과 같이 객체가 저장되어있는 변수를 편하게 볼 수 있다 ** 라이브러리를 활용하려면 파일의 최 상단에 다음과 같이 require을 선언해야한다. __DIR__는 현재 경로를 뜻함
-
php 기본 문법 2php 2023. 8. 9. 16:28
1. 변수 타입 - 일반 변수 - 특수 변수 // array $arr_int_values = [1, 2, 3, 666]; // array but map $map_values = [ 'name' => '선현민', 'position' => '책임' ]; // array in array $employees = [ [ 'name' => '선현민', 'position' => '책임' ], [ 'name' => '홍종무', 'position' => '매니저' ], [ 'name' => '이서영', 'position' => '매니저' ], ]; 2. 변수 출력 - 일반 변수 출력 // 일반형 // 요약형 - 배열 변수 출력 // 일반 배열 출력 (index) // 키 값이 있는 배열 출력
-
-
php 백엔드 개발환경 설정 (windows)php 2023. 8. 8. 14:53
1. scoop에 버킷을 생성하고 필요한 버전의 php를 다운받는다 scoop bucket add versions scoop install apache php74 php81 php74-xdebug php81-xdebug composer symfony-cli wp-cli php -v # PHP 버전 확인 2. php 환경 설정 (예시 PHP 8.1 버전 ) - php.ini 를 변경하는 것으로 PHP 서버의 옵션을 변경할 수 있다. php.ini는 cli 폴더 내부에 있는 것으로 활용하겠다. # PHP 8.1 수정 방법 code $env:USERPROFILE\scoop\apps\php81\current\cli\php.ini # Visual Studio Code 로 열림 3. 확장 프로그램 설정 - php에..
-
scoop으로 php 다운받기php 2023. 8. 8. 14:34
1. PowerShell로 scoop 다운로드 # 실행 권한 변경 Set-ExecutionPolicy RemoteSigned -scope CurrentUser # 설치 Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') # 또는 짧은 명령어 iwr -useb get.scoop.sh | iex # 설치 확인 scoop 2. scoop으로 필요한 프로그램 다운로드 # 프로그램 검색 # scoop search ${search_keywords} scoop search git # 프로그램 설치 # scoop install ${app_name} scoop install git # Powershell에서 '..