标签目录:php
PHP四大基本排序算法包括:冒泡排序法,快速排序法,选择排序法,插入排序法。1. 冒泡排序思路分析:在要排序的一组数中,对当前还未排好的序列,从前往后对相邻的两个数依次进行比较和调整,让较大的数往下沉,较小的往上冒。即,每当两相邻的数比较后发现它们的排序与排序要求相反时,就将它们互换。代码实现:$arr=array(1,43,54,62,21,66,32,78,36,76,39);functionbubbleSort($arr){$len=coun...
继续阅读 >
<?phpechodate("Ymd",strtotime("now")),"\n";echodate("Ymd",strtotime("-1weekMonday")),"\n";echodate("Ymd",strtotime("-1weekSunday")),"\n";echodate("Ymd",strtotime("+0weekMonday")),"\n";echodate("Ymd",strtotime("+0weekSunday")),"\n";echo"*********第几个月:";echodate('n');echo"*********本周周几:";echodate("w");echo"*********本月天数:";...
继续阅读 >
2015
02-05
2015
02-04
<?php$requestUrl='phpxs.com';$ch=curl_init();$timeout=5;curl_setopt($ch,CURLOPT_URL,$requestUrl);curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);curl_setopt($ch,CURLOPT_PROXYAUTH,CURLAUTH_BASIC);//代理认证模式curl_setopt($ch,CURLOPT_PROXY,"112.23.451.72");//代理服务器地址curl_setopt($ch,CURLOPT_PROXYPORT,80);//代理服务器端口//curl_...
继续阅读 >
2015
01-31