php代码
Git是一款免费、开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目。Git 的工作需要调用 curl,zlib,openssl,expat,libiconv 等库的代码。Git 目前支持 Linux/Unix、Solaris、Mac和 Windows 平台上运行。本文给大家带来Git参考手册,需要的可以来下载!
< ?php
function vita_get_url_content($url) {
if(function_exists(file_get_contents)) {
$file_contents = file_get_contents($url);
} else {
$ch = curl_init();
$timeout = 5;
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
}
return $file_contents;
}
?>









