'php'에 해당되는 글 3건

1.PHP.NET

https://www.php.net/manual/en/indexes.functions.php

 

PHP: Function and Method listing - Manual

Function and Method listing List of all the functions and methods in the manual a b c d e f g h i j k l m n o p q r s t u v w x y z _ a abs - Absolute value acos - Arc cosine acosh - Inverse hyperbolic cosine addcslashes - Quote string with slashes in a C

www.php.net

2.https://javaexpert.tistory.com/510

 

php 함수목록

PHP  abs()  절대값을 리턴한다 PHP  acos()  라디안으로 주어진 값을 아크코사인값을 리턴한다 PHP  addcslashes()  문자열앞에 역슬레쉬를 추가한다 PHP  addslashes()  ‘,”,\ 앞에 역슬래쉬를 추가한..

javaexpert.tistory.com

3.https://www.w3bai.com/ko/php

 

PHP list() Function

PHP list() Function 예 배열처럼 변수를 할당 : <?php $my_array = array("Dog","Cat","Horse"); list($a, $b, $c) = $my_array; echo "I have several animals, a $a, a $b and a $c."; ?> »실행 예 정의 및 사용 list() 함수는 하나의 작동 변

www.w3bai.com

 

블로그 이미지

AutoLoop

컴퓨터 하드웨어 소프트웨어 정보 각종 유틸리티 해외정보 가상화폐 코인 주식 차트 마케팅 컨설팅 자료모음 및 설명

,

PHP CURL 사용법

WEB 관련 2022. 6. 29. 19:58

<?
// GET 방식 함수
function get($url, $params=array()) { 
    $url = $url.'?'.http_build_query($params, '', '&');
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $response = curl_exec($ch);
    curl_close($ch);
    return $response;
}  
// get함수 호출
get('url', array('param1'=>'value1', 'param2'=>'value2'));
 
 
// POST 방식 함수
function post($url, $fields){
    $post_field_string = http_build_query($fields, '', '&');
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_field_string);
    curl_setopt($ch, CURLOPT_POST, true);
    $response = curl_exec($ch);
    curl_close ($ch);
    return $response;
}  
// post함수 호출
post('url', array('field1'=>'value1', 'field2'=>'value2'));
?>

블로그 이미지

AutoLoop

컴퓨터 하드웨어 소프트웨어 정보 각종 유틸리티 해외정보 가상화폐 코인 주식 차트 마케팅 컨설팅 자료모음 및 설명

,
Nginx + php7.4-fpm kali 설치
sudo apt-get update
sudo apt-get install nginx
nginx 시작 명령어
service nginx reload;
sudo /etc/init.d/nginx start
systemctl start nginx
상태확인
service nginx status
service php7.4-fpm status
netstat -lntp
journalctl -xe
  
방화벽 
sudo ufw allow 'Nginx HTTP'
시작
service nginx start
재시작 관련
service nginx restart
service php7.4-fpm restart
/etc/init.d/nginx restart
/etc/init.d/nginx reload
nginx -s reload
systemctl reload nginx
자동시작
systemctl enable nginx
php 설치 리스트
sudo apt install php7.4-fpm php7.4-common php7.4-mysql \
php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd \
php7.4-imagick php7.4-cli php7.4-dev php7.4-imap \
php7.4-mbstring php7.4-opcache php7.4-redis \
php7.4-soap php7.4-zip -y
테스트
nginx -t
php7.0-fpm -t
php.ini 수정
php.ini 위치찾기
php -i | grep "Loaded Configuration File"
locate php.ini
gedit /var/www/html/info.php

<?php phpinfo(); ?>

브라우저에서 localhost/info.php 
에러나 빈 블랙스크린일 경우 에는 설정파일 수정한다.
nginx 설정파일 수정
/etc/ngix/site-available/default

server {
   listen 80 default_server;
   listen [::]:80 default_server;

   root /var/www/html;
   # Add index.php to the list if you are using PHP
   index index.html index.htm index.nginx-debian.html;
   server_name my.example.com;
   location / {
       try_files $uri $uri/ =404;
    }
   location ~ \.php$ {
       include snippets/fastcgi-php.conf;
       fastcgi_pass unix:/run/php/php7.0-fpm.sock;
   }
}
default 수정후 안될경우
gedit /etc/nginx/fastcgi_params  
추가 
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

'Linux & Windows' 카테고리의 다른 글

ubuntu kali 단축키 설정  (0) 2020.09.19
MariaDB Mysql-WorkBench kali 설치  (0) 2020.09.18
Kali 2020 Plasma5 설치  (0) 2020.09.17
Samba 공유 설정  (0) 2020.09.17
Kali Plasma5 Ghost 테마 Dual 모니터 설정  (0) 2020.09.16
블로그 이미지

AutoLoop

컴퓨터 하드웨어 소프트웨어 정보 각종 유틸리티 해외정보 가상화폐 코인 주식 차트 마케팅 컨설팅 자료모음 및 설명

,