Web Program159 날짜 연산 함수 function fnc_date_calc($this_date,$num_days){ $my_time = strtotime ($this_date); //converts date string to UNIX timestamp $timestamp = $my_time + ($num_days * 86400); //calculates # of days passed ($num_days) * # seconds in a day (86400) $return_date = date("Y/m/d",$timestamp); //puts the UNIX timestamp back into string format return $return_date;//exit function and return string }//end of funct.. 2008. 9. 8. 날짜 연산 $date22 = 20070214; $daterr = date("Ymd", strtotime("$date22 +1 day")); => 20070215 $daterr = date("Ymd", strtotime("$date22 + 2 days")); => 20070216 $daterr = date("Ymd", strtotime($date22) + 86400); 2008. 9. 8. 엑셀 파일 다운 받기 $fname = time(); header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=order_$fname.xls"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); header("Pragma: public"); 2008. 9. 8. 일단위 절사 $DTS_UID2 = 1234567 $DTS_UID2 = (int)($DTS_UID2 / 10); $DTS_UID2 = $DTS_UID2 * 10; 2008. 9. 8. 이전 1 ··· 20 21 22 23 24 25 26 ··· 40 다음