search
HomeBackend DevelopmentPHP ProblemHow to enable CURL support in php

How to enable CURL support in php

Mar 21, 2020 pm 05:18 PM
php

How to enable CURL support in php

When developing CMS with PHP, you need to use PHP's curl function. By default, this function needs to enable the CURL extension. If you have the right to use the host, you can use PHP.ini File to open this extension, the method is as follows:

1. Open php.ini, locate;extension=php_curl.dll, and remove the ";" in front of it.

2. Copy the three files: php_curl.dll, libeay32.dll and ssleay32.dll in the ext directory under the PHP directory to the system system32 directory, and restart IIS or apache.

3. In order to ensure whether the CURL extension is enabled, you can test it with the following code:

<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"www.baidu.com");
curl_setopt($ch,CURLOPT_HEADER,1);
curl_exec($ch);
curl_close($ch);
?>

Related recommendations:

PHP video tutorial: https://www.php.cn/course/list/29/type/2.html

The above is the detailed content of How to enable CURL support in php. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:博客园. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment