0

当我在代码下面尝试时,它让我返回空白。任何线索可能是什么原因?

<?php

function tiny_url($url){

$ch = curl_init();
$timeout = 5; 
curl_setopt($ch,CURLOPT_URL,'http://tinyurl . com/api-create.php?url='.$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE );
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}


echo tiny_url("www.google.com");


?>
4

0 回答 0