전체 글 288

모바일에서 유튜브영상 크기 자동조정 방법

.yutubeVideo { margin-top:20px; position: relative; width: 100%; padding-bottom: 56.25%; } .yutubeVideo iframe { position: absolute; width: 100%; height: 100%; } https://www.youtube.com/embed/유튜브영상아이디" title="Documentation Glass Partiton without model" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen>

php 문자열 자르기(substr) - 원하는 길이만큼 잘라서 가져오기

php에서 문자열을 잘라서 가져오는 방법에 대해서 알아보겠습니다. 시간에서 시분초만 가져오는 방법을 예로 들어보겠습니다. 시간이 '2022-08-08 08:08:08' 이라고 한다면, 우리가 잘라서 가져오고 싶은 시분초는 '08:08:08' 입니다. $time = '2022-08-08 08:08:08'; $time_s = substr($time,11,8); echo $time_s; 결과는 08:08:08 #설명 substr($time,11,8) 함수의 기능은 $time 문자열에서 11번째 부터, 8개의 문자열을 가져오라는 함수입니다.

PHP 에서 CURL 로 JSON 형식으로 보내고 리턴받기(POST 전송)

$url = " $uuid, "amount" => $amount, "currency" => $currency, "from" => $from, "way" => $way, "to" => $to); $json_data = json_encode($post_date); $flg = curlSend($url, $json_data); if($flg=='Y') { //결과가 "Y" 경우 처리 } else if($flg=='N') { //결과가 "N" 경우 처리 } function curlSend($url, $json_data) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); cu..

반응형