摘要:
1 function getpathinfo( $a, $b ) { 2 3 $a2array = explode('/', $a); 4 5 $b2array = explode('/', $b); 6 7 $pathinfo = ''; 8 9 for( $i = 1; $i <= count($b2array)-2; $i++ ) {10 11 $pathinfo.=$a2array[$i] == $b2array[$i] ? '../' : $b2array[$i].'/';12 }13 print_ 阅读全文
摘要:
print_r(parse_url('http://www.baidu.com/test.php?id=10'));Array([scheme]=>http[host]=>www.baidu.com[path]=>/test.php[query]=>id=10) 阅读全文
摘要:
select * from tb_user where fid IN (10,33,22,76,13,44) order by FIND_IN_SET(fid,'10,33,22,76,13,44');select * from tb_user where fid IN (10,33,22,76,13,44) order by field(fid,10,33,22,76,13,44); 阅读全文
摘要:
1 $startdate=strtotime("2009-9-5");2 $enddate=strtotime("2009-9-18"); 3 $days=round(($enddate-$startdate)/3600/24) ;4 echo $days; 阅读全文