我已经完成了 sudo apt-get install curl、sudo apt-get php5-curl、sudo apt-get php-curl 但我得到了 curl_init() 的未定义函数
有谁知道这方面的任何解决方案?
这是我的PHP代码。
<?php
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, "example.com");
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
// close curl resource to free up system resources
curl_close($ch);
?>