일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- SSL
- Xdebug
- git pull
- centos
- new user
- Mac
- php
- MariaDB
- Google Cloud
- crontab
- https
- 구글 클라우드
- home page
- child theme
- launch.json
- wordpress
- Fail2ban
- front page
- non-www
- Apache
- Linux
- html
- root
- mysql
- vscode
- LetsEncrypt
- CentOS7
- DOM Parser
- Liniux
- Certbot
- Today
- Total
목록php (5)
between 0 and 1
xdebug (version 3.x.x +) install pecl install xdebug xdebug 3+ version will be installed (@2021.01.03) configuration php.ini [xdebug] zend_extension="xdebug.so" xdebug.mode=debug check $> php -i | grep “xdebug” vscode connection run vscode shft+command+x (to bring up the extensions window) find and install “PHP Debug” open debug window (shift + command + D) create launch.json set xdebug port 900..
서버 요청이 HTTP에서 이뤄지는지 HTTPS/SSL에서 이뤄지고 있는지 확인이 필요할 때가 있다.Global Vairable인 $_SERVER를 이용해 간단히 확인할 수 있다. function isHttpsRequest() {if ( (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) {return true; } return false; } HTTPS/SSL 요청은 아래 2가지 조건 중 하나라도 참인 경우로 판정한다. 1. $_SERVER['HTTPS'] 가 존재하면서, 그 값이 off가 아닌 경우 (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !=..
php 로 개발을 할 때, var_dump를 이용해 디버깅하게 되는데,이때, 긴 문자열은 전체가 다 나오지 않고, 일부분만 크롭되어 보이는 경우가 있다. 전체 문자열을 모두 보고 싶을 때는, 제한을 풀어줘야 한다. 특히 xdebug를 사용하는 중이라면, xdebug에서 var_dump 설정값이 오버로드 되므로,php.ini에서 xdebug의 값을 변경해 주어야 한다. 변경해줘야 할 값은 총 3가지로 아래와 같다. xdebug.var_display_max_children = -1xdebug.var_display_max_data = -1xdebug.var_display_max_depth = -1 위 변수들에 관한 정보는 xdebug 홈페이지에 설명되어 있다 (https://xdebug.org/docs/ind..
PHP Simple HTML DOM Parser Link: http://simplehtmldom.sourceforge.net/ Usage: // Include the libraryinclude('simple_html_dom.php'); // Retrieve the DOM #1 - from a given URL$html = file_get_html('https://davidwalsh.name/'); // Retrieve thd DOM #2 - from a file or string variable$html = str_get_html($row->value); // Find all "A" tags and print their HREFsforeach($html->find('a') as $e) { echo $e-..
CentOS 7에 서버환경을 구축하는 간단한 방법!(Apache, PHP, MariaDB) 1. 서버 환경 설치 - Apache, PHP, MariaDB $> yum install httpd php mariadb-server php-mysql 2. 시작 서비스로 등록 - 서버가 부팅될 때 서비스가 자동으로 시작되도록 등록 $> systemctl enable httpd$> systemctl enable mariadb 3. 서비스 시작$> systemctl start httpd$> systemctl start mariadb 4. MariaDB 관리자 비밀번호 설정$> mysql_secure_installation 5. MariaDB 외부에서 접근 가능하도록 설정1) root 계정으로 MariaDB 접속$> ..