본문 바로가기

기타/PHP10

cURL error 60: SSL certificate https://stackoverflow.com/questions/29822686/curl-error-60-ssl-certificate-unable-to-get-local-issuer-certificate cURL error 60: SSL certificate: unable to get local issuer certificate I am trying to send an API request using Stripe but get the error message: cURL error 60: SSL certificate problem: unable to get local issuer certificate This is the code I am running: public fun... stackoverflow... 2022. 11. 25.
There is no active transaction https://stackoverflow.com/questions/41392982/php-pdo-there-is-no-active-transaction PHP PDO - There is no active transaction I am having problem with transactions in php script. I would like to make multiply queries and be able to recall them all, if at least one of them fails. Below you can find a simple example of the ... stackoverflow.com 한줄요약 beginTransaction()의 경우 try catch문 밖에 위치해야한다. == T.. 2022. 10. 26.
'' // "" // 따옴표처리 magic_quotes_gpc가 설정되어있을경우 자동으로 값을 이스케이프 시켜준다. 이값을 사용자 화면에 출력할경우 데이터베이스에 "sample"이라고 저장했을때 사용자에게 바로 출력하게되면 \"sample\" 해당형태로 출력되게 된다. 해당형태를 해결해주는 방법은 stripslashes() 함수를 통해서 해결할수있다. 하지만 input 태그에 해당부분을 넣게되면 해당형태로 주석처리되어 해당문자 하나만 출력되는것을 알수있다. 해당부분을 해결하기위해서 htmlspecialchars를 사용한다 해당함수는 특수문자를 HTML엔티티로 변경하게된다 예를들면 ""(곁따옴표) 의 경우는 " ''(홑따옴표) 의 경우는 &0#39;의형태로 변형시킨다. 해당 함수 적용 결과값이지만 우리가 원하는 형태는 아니다 strips.. 2020. 3. 31.
fcm https://firebase.google.com/docs/cloud-messaging/concept-options?hl=ko FCM 메시지 정보 | Firebase Firebase 클라우드 메시징(FCM)은 다양한 메시징 옵션과 기능을 제공합니다. 이 페이지의 정보는 다양한 유형의 FCM 메시지에 관한 이해를 돕고 FCM으로 구현할 수 있는 기능을 소개하기 위한 내용입니다. 메시지 유형 FCM을 통해 2가지 유형의 메시지를 클라이언트에 보낼 수 있습니다. 알림 메시지: 종종 '표시 메시지'로 간주됩니다. FCM SDK에서 자동으로 처리합니다. 데이터 메시지: 클라이언트 앱에서 처리합니다. 알림 메시지에는 사용자에게 firebase.google.com 이전 HTTP 프로토콜 알림 페이로드 Firebase.. 2019. 9. 10.
curl https://www.php.net/manual/en/function.curl-init.php PHP: curl_init - Manual www.php.net https://www.php.net/manual/en/function.curl-setopt.php PHP: curl_setopt - Manual I spent a couple of days trying to POST a multi-dimensional array of form fields, including a file upload, to a remote server to update a product. Here are the breakthroughs that FINALLY allowed the script to run as desired.Firs.. 2019. 9. 10.
implode,explode implode 배열을 구분자를 통해서 문자열로 만든다. implode(구분자,배열) https://www.php.net/manual/en/function.implode.php PHP: implode - Manual It's not obvious from the samples, if/how associative arrays are handled. The "implode" function acts on the array "values", disregarding any keys: 'four', 'five', '3rd' => 'six' );echo implode( ',', $a ),'/', implode( ',', $b );?>outputs:one,two,three/fou www.php.net explode 구.. 2019. 6. 20.
php.ini 업로드관련설정값 #vi /etc/php.ini file_uploads = On 이겠지 당연히.. 1. upload_max_filesize 한번에 업로드 가능한 사이즈를 설정한다. upload_maz_filesize = 10M 설정시 10M까지 업로드 가능해진다. 2. post_max_size post 최대 용량 설정이다 파일사이즈를 고려해서 사이즈를 설정해줘야한다. post_max_size = 60M 3. max_execution_time php실행시간인데 대용량의 경우 시간을 늘려주는것이 좋다. 4. max_input_time 실제 첨부파일 업로드시 데이터를 대기해주는시간이다 기본값은 낮게 설정되어있으므로 대용량 업로드시 올라가지 않는 주요원인이된다. -1 설정이 무제한으로 적용된다. 5. memory_limit ph.. 2019. 5. 3.
MSSQL_FETCH ROW, ASSOC, ARRAY MSSQL_FETCH_ROW MSSQL_FETCH_ASSOC MSSQL_FETCH_ARRAY 3가지의 차이점 기본샘플 $sql = "SELECT * FROM SAMPLE"; $rst = mssql_query($sql); $row = $mssql_fetch_row($rst); 1. MSSQL_FETCH_ROW 의경우 배열의 번호만 접근가능하다. $row[0] $row[1] $row[2] 의 형태로 배열번호로 접근한다. 2. MSSQL_FETCH_ASSOC : assoc의 경우 연관배열의 줄임말로 필드명을 통해서 데이터를 가져온다. $row[name] $row[age] 3. MSQL_FETCH_ARRAY : 위의 두가지형태를 동시에 가져온다. 만약 결과값이 처음위치가 이름이고 두번쨰가 나이인경우 $row[0.. 2019. 4. 15.
$_SESSION https://www.php.net/manual/en/reserved.variables.session.php PHP: $_SESSION - Manual I wrote a little page for controlling/manipulating the session. Obviously, never use this on a production server, but I use it on my localhost to assist me in checking and changing session values on the fly.Again, it makes use of eval() and exposes the ses www.php.net php 4.1이상부터 사용가능하다 기본적인 세팅은 그누보드를 참조했다. //==.. 2019. 4. 15.