Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- HTML
- 전략
- php
- 웹하드순위
- OOP
- post
- Forms
- composer-php
- file-upload
- Apache
- JSON
- Arrays
- Regex
- Laravel
- string
- 무료다운로드쿠폰
- JavaScript
- curl
- Ajax
- Linux
- Session
- date
- MySQL
- UTF-8
- function
- 경영
- jquery
- variables
- 웹하드추천
Archives
- Today
- Total
개발! 딱 깔끔하고 센스있게!
$ _POST 대 $ HTTP_RAW_POST_DATA 대 file_get_contents (php : // input)? [복제] 본문
개발 스크랩 메모/PHP
$ _POST 대 $ HTTP_RAW_POST_DATA 대 file_get_contents (php : // input)? [복제]
렉사이 2020. 12. 14. 22:39Possible Duplicate:
What’s the difference between POST and raw POST in PHP at all?
더 이해할 수 있도록 post,$htp u post u post u data, file u get uconts (php://input)의 근본적인 차이를 설명해 주시면 감사하겠습니다.
언제 어느 것을 사용합니까?
대답
- $_POST contains URL encoded (application/www-url-encoded) variables that are posted to your script and PHP decodes them for you. You use this one when you deal with HTML FORM data.
- file_get_contents("php://input") - gets the raw POST data and you need to use this when you write APIs and need XML/JSON/... input that cannot be decoded to $_POST by PHP.
- $HTTP_RAW_POST_DATA - in theory it is the same as the above but depends on php.ini.
내가 비응용 프로그램 / www url 인코딩 입력을 필요로 할 때, 나는 항상 방법을 2, 방법을 3이 아니다.
'개발 스크랩 메모 > PHP' 카테고리의 다른 글
Apache에서 PHP 파일을 일반 텍스트로 표시하는 방법 (0) | 2020.12.14 |
---|---|
json_encode ()를 사용하여 PHP 배열을 JSON 배열로; (0) | 2020.12.14 |
PHP 인코딩 문제 (UTF-8) (0) | 2020.12.14 |
PHP 스크립트 / 디렉토리에 어떤 권한이 있습니까? (0) | 2020.12.14 |
대소 문자를 구분하지 않는 PHP in_array 함수 (0) | 2020.12.14 |
Comments