Home>Article>Backend Development> php curl_exec() return value summary

php curl_exec() return value summary

怪我咯
怪我咯 Original
2017-06-01 15:35:42 8557browse

In PHP, the curl_exec function is one of the PHP cURL function lists. Its function is to execute a cURL session. This article summarizes some usage examples of the php curl_exec function.

一.Detailed explanation of usage examples of PHP curl_exec function

timg (53).jpg

This article introduces the syntax and examples of PHP curl_exec function in detail , this function should be called after a cURL session has been initialized and all options have been set. Its return value: TRUE on success, or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set, the function will return the result of the execution if it succeeds, and FALSE if it fails.

二.How to get the return value of the php curl_exec() function CURL

This article mainly introduces two methods of getting the return value of the php curl_exec() function CURL. 】

The first method is to get the page content and output the example directly.

The second method is to obtain page content without directly outputting examples.

3.php curl_exec function to obtain the output information of the CURL request

After executing a cURL session, we need to obtain the relevant information of the executed CURL.This article introduces how to use the curl_getinfo() function to obtain relevant information about the CURL request output

IV.Solution to the problem that the php curl_exec function returns false

php curl_exec() return value summary

This article introduces how sometimes when PHP uses curl to request, the page is blank and nothing is output. Debugging found that the return result is: false. If this happens to you, you can read the solution in the article.

五.Share a solution when the PHP server does not support the php curl_exec function

php curl_exec() return value summary

This article mainly introduces when you find The server does not support the curl_exec function liberation method. As long as you follow the operation of the article, I believe your problem will be solved soon.

php curl_exec() function related questions and answers

##php - curl_exec returns false, curl_error returns empty

##php - win7 64-bit curl_exec($ch) returns always false

php - curl_exec The data returned by this function is displayed directly in the browser. How to save the data in variables

[php curl_exec() function related articles recommended: 】

Alibaba Cloud virtual host reports a 500 error when executing curl_exec without detailed information

The above is the detailed content of php curl_exec() return value summary. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn