This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//当月初始时间 | |
$beginThisMonth = date("Y-m-d H:i:s", mktime(0, 0, 0, date('m'), 1, date('Y'))); | |
//当月结束时间 | |
$endThisMonth = date("Y-m-d H:i:s", mktime(23, 59, 59, date('m'), date('t'), date('Y'))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function () { | |
$('#form1').submit(function () { | |
var formdata = new FormData(); | |
var fileObj = document.getElementById("fileToUpload2").files; | |
for (var i = 0; i < fileObj.length; i++) | |
formdata.append("file" + i, fileObj[i]); | |
$.ajax({ | |
type: 'POST', | |
url: '/Home/Upload2', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function crypto_rand_secure($min, $max) | |
{ | |
$range = $max - $min; | |
if ($range < 0) return $min; // not so random... | |
$log = log($range, 2); | |
$bytes = (int)($log / 8) + 1; // length in bytes | |
$bits = (int)$log + 1; // length in bits | |
$filter = (int)(1 << $bits) - 1; // set all lower bits to 1 | |
do { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |