[php] 배열 내 순회하면서 순차적으로 내용 출력하기 let data = [1,2,3,4,5,6]; let arrId = 0; setInterval(() => { console.log(data[arrId]); arrId++; if(arrId == data.length) { arrId= 0; } }, 1000); 이렇게 하면 1초마다 해당 data에 있는 배열값이 하나씩 찍힌다. 회사에서 일하면서 주기적으로 해당 부분을 인터벌 돌려줘야하는 곳이 있어, 만들어보았다. 취업/PHP 2022.03.24
[php] php 업로드 파일 크기 제한 해제하기. 일단 페이지에 출력하는 부분(라우팅?)에 phpinfo()를 이용하여 해당 php 정보를 호출한다. 그러하면 php loaded configuration file라고 써있는 부분이 있는데, 이곳으로 이동한다. 터미널이든 ubuntu이든 상관없다. 해당 파일이 있는 곳으로 이동 후 php.ini를 수정한다. https://iwordpower.com/wp-content/uploads/2017/04/php-ini-path-windows.jpg - 파일 업로드 허용 여부 설정 file_uploads = On //On 또는 Off로 설정 - 파일 업로드 사이즈의 최대 크기 설정 upload_max_filesize = 2M //최대 2048M 이하로 설정 - 파일 업로드 최대 개수 설정 max_file_upload.. 취업/PHP 2022.03.07
[UI] 무료 벡터 디자인 사이트 https://www.iconfinder.com/ 6,175,000+ free and premium vector icons, illustrations and 3D illustrations Iconfinder is the world's largest marketplace for icons, illustrations and 3D illustrations in SVG, AI, and PNG format. www.iconfinder.com 파일 검색 후 왼쪽 상업 말고 무료로 찾으면 나온다. 취업/UI 디자인 2022.02.24
[UI] ui 디자인 도안 사이트 https://dribbble.com/ Dribbble - Discover the World’s Top Designers & Creative Professionals Discover the world’s top designers & creatives Dribbble is the leading destination to find & showcase creative work and home to the world's best design professionals. Sign up dribbble.com modal ui https://dribbble.com/shots/3933315-Terms-of-Service-Daily-UI-089 Terms of Service- Daily UI:: #089 Today's c.. 취업/UI 디자인 2022.02.23
[UI] input, selectbox, box-shadow css, modal popup 디자인 사이트 좀 뻘글이긴한데, 그냥 회사에서 쓰려고 디자인 찾기 귀찮아서 저장해둠. https://csshint.com/css-input-text/ 20+ CSS Input text - csshint - A designer hub Latest Collection of free Hand picked Html CSS Input text Examples. Demo and Download the zip (*.zip). jumping input text, CSS Floated Labels csshint.com https://freefrontend.com/css-select-boxes/ 31 CSS Select Boxes Collection of free HTML and CSS custom select box code exam.. 취업/UI 디자인 2022.02.23
[ci4] 최소지원 php 버전은 7.2? 7.3? 회사에선 ci4이지만, php 버전 7.2를 쓰는데, ci4에선 다운로드에선 최소 지원이 7.3버전이더라 https://codeigniter.com/download Welcome to CodeIgniter CodeIgniter 4 is the latest version of the framework, intended for use with PHP 7.3+ (including 8.0). The initial release was February 24, 2020. The current version is v4.1.8. You *could* download this version of the framework using the button below, but w codeigniter.com 무엇이 문제인고? .. 취업/CodeIgniter 2022.02.22
[Dropzone] 업로드 파일 선택 버그 버그 체크를 하는데, 간혹 파일 선택을 했는데 다시 파일 선택창이 뜬다. 무엇이 원인인고? 하고 봤더니 라이브러리 자체버그.. 기본 공식문서에서 주는 방법이다. 이렇게 쓰지말고, 그냥 버그 없는 것 같은 라이브러리 버전 찾아서 해당 버전으로 고정해서 쓰자. 이래야 버그가 없더라. 취업/Dropzone 2022.02.18
[PHP] INPUT type="file" 업로드 즉시 사진 업로드 시키기. $('#upload').on('change', function() { console.log('upload'); }); 방법은 간단하다. 변화를 감지하게 하여 해당 파일이 업로드시에 해당 console.log가 찍히는 부분에 원하는 코드 예를 들어 ajax나 또는 axios, fetch를 넣어 서버에 통신하게 하면된다. 속도에 문제가 있다하면, 제이쿼리보다 바닐라코드가 빠르므로 제이쿼리를 쓰지 않는다면, 바닐라 코드를 쓰길 권장한다. document.getElementById('upload'); 이렇게 접근하면 된다. 취업/PHP 2022.02.17
[chart.js] 차트 그래프 내의 value값 표시하기. 차트 js를 사용하다보면 차트 내에서 해당 값이 어떤지 표시할 필요가 있다. 시안성 측면에서 매우 유리하니까. 그런데, 이게 기능구현이 매우 어려웠다. 왜 안되나 했더니 이게 확장 라이브러리로 지원하는 기능이었네? 사용방법은 3번째 링크를 참조하자. 대충 공식문서를 보면 plugins 코드 안에 설정하고, data 객체에도 따로 넣어주면 된다. 하지만 3번째 링크보면 더 자세히 설명되어 있다. Chart.defaults.set('plugins.datalabels', { color: '#FE777B' }); var chart = new Chart(ctx, { options: { plugins: { // Change options for ALL labels of THIS CHART datalabels: { .. 취업/Chart.js 2022.02.09
[php] Uncaught TypeError: Illegal invocation bootstrap 종류가 여러가지인데, ajax 오류일수도 bootstrap일수도... 아무튼, 나의 경우에는 bootstrap이였다. 원인은 클릭 이벤트에 발생 하는 곳이 modal 이벤트가 발생했는데, 해당 부분이 모달에서 다른 이벤트로 전환되자 발생한 오류였다. data-toggle="modal" data-target="#popup_buy" 이걸 제거하니 해당 오류는 사라졌다. 취업/PHP 2022.02.04