본문 바로가기
반응형

분류 전체보기576

[PHP] MySQL 사용하기. #connection MySQL + PHP MySQL 이 설치 되어있는 서버가 필요합니다. 아니면 여기 참고해서 설치 하시고요~ 1. php.ini 수정 php 경로에 php.ini 를 텍스트 에디터로 엽니다. ;extension=mysqli 를 extension=mysqli 로 수정합니다. 저장 후 apache24 를 재시작합니다. 그리고 php 파일을 하나 만들어서 테스트 합니다. Connection $host = 'localhost'; $user = 'root'; $pw = 'passwd'; $dbName = 'dbname'; $conn = mysqli_connect($host, $user, $pw, $dbName); if (mysqli_connect_errno()) { echo "MySQL 접속 실패". mysqli_.. 2020. 12. 17.
[javascript] event 에 $(this) 사용 시 주의 사항. 01 event callback 에 ()=>{} 와 function(){} 의 차이. 아래와 같은 select box 가 있을 때, aa bb change event 를 설정 하려면 $('#classLabels').change(함수) 를 사용합니다. // function(){} 사용 $('#classLabels').change(function(){ let selectedVal = $(this).val(); $(this).val(''); alert(selectedVal); }); function(){} 을 사용했을 때 $(this) 는 를 잘 찾습니다. 하지만 아래와 같이 ()=>{} 를 사용하면 // ()=>{} 사용 $('#classLabels').change(()=>{ let selectedVal = $(.. 2020. 12. 15.
[PHP] 변수 데이터형 #PHP Data Types PHP Data Types String Integer Float Boolean Array Object NULL Resource 설명은 역시 예제로 보는게 빠르죠. # String 결과 1. Hello~Bryan 2. Hello~Bryan 3. Hello~$name " " 안에 변수를 쓰면 변수의 값이 나옵니다. ' ' 안에 사용하면 문자 그대로 출력됩니다. 문자 이어붙히기는 . 을 사용합니다. "hi~"."bye~"."!" == "hi~bye~!" # Integer 결과 26 123 83 일반적으로 사용하는것은 $b 처럼 숫자를 대입하는것입니다. 하지만 앞에 0 이 있으면 8진법으로 인식하죠. 명시적으로 8진법을 계산하는 함수는 octdec() 와 decotc() 입니다. echo octdec('0123.. 2020. 12. 13.
Windows MySQL 5 .x 설치 Windows MySQL 설치 downloads.mysql.com/archives/installer/ MySQL :: Download MySQL Installer (Archived Versions) Please note that these are old versions. New releases will have recent bug fixes and features! To download the latest release of MySQL Installer, please visit MySQL Downloads. MySQL open source software is provided under the GPL License. downloads.mysql.com 5.x 버전을 설치해야하면 버전을 맞게 선택합니다. .. 2020. 12. 12.
[pyQT] 단순 alert 창 띄우기. 버튼 하나만 있는. pyQT alert 창 띄우기 QMessageBox.question(self.window, 'Message', 'hello~ bryan~', QMessageBox.Yes, QMessageBox.NoButton) 2020. 12. 11.
[Python] (Windows) Open Explorer. 탐색기 열기 path 에는 상대경로도 되고 절대경로도 되네요. import os path = os.path.realpath('your path here') os.startfile(path) 2020. 12. 11.
[pyQT] File/Directory 선택 Dialog 띄우기 QFileDialog QFileDialog def folderOpen(self): """ file/files/folder 선택 dialog """ # Directory 를 선택합니다. folder = QFileDialog.getExistingDirectory(self.window, "Select Directory") print(folder) # C:/Users/combr/PycharmProjects/somePath/venv/Lib # File 하나를 선택합니다. Tuple 로 리턴합니다. 첫번째 path:str file = QFileDialog.getOpenFileName(self.window, 'Choose File', folder, filter='') print(file) # ('C:/Users/combr/setuptoo.. 2020. 12. 11.
[PHP] short tag 사용하기 : <?php 대신 <? 사용 short_open_tag php.ini 파일을 찾아서 텍스트 에디터로 열어서 수정합니다. short_open_tag 를 찾아서 Off short_open_tag = Off 를 short_open_tag = On 으로 바꿉니다. 그럼 2020. 12. 10.
[apache] Windows에 apache2.4 설치 + php7 연동 Apache2.4 + php7 Apache2.4 설치 www.apachelounge.com/download/ Apache VS16 binaries and modules download www.apachelounge.com x64, x32 중 본인 pc에 맞는 버전을 다운로드 합니다. C:\apache24 에 압축을 풉니다. cmd 를 관리자로 실행합니다. C:\apache24\bin 폴더로 이동해서 아래 명령어로 설치를 합니다. httpd.exe -k install Power Shell 인 경우에는 C:\Apache24\bin>.\httpd.exe -k install 윈도우 시작 > service 입력해서 서비스를 실행한 다음. Apache24를 찾아서 "시작"을 누릅니다. 정상적으로 시작이 됐네요. P.. 2020. 12. 10.
[Apache] Windows Tomcat 설치 : Tomcat 9 Windows 에 Tomcat 설치 Tomcat 9 윈도우에서는 편하게 Tomcat 을 설치할 수 있습니다. 설치 파일로 다운로드 아래 링크로 이동합니다. tomcat.apache.org/ Apache Tomcat® - Welcome! The Apache Tomcat® software is an open source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies. The Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket specifications ar tomcat.apa.. 2020. 12. 9.
728x90
반응형