What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-09-25 01:23:04
php how to rename a file before saving it
$temp = explode(".", $_FILES["file"]["name"]); $newfilename = round(microtime(true)) . '.' . end($temp); move_uploaded_file($_FILES["file"]["tmp_name"], "../img/imageDirectory/" . $newfilename); Add solution -
PHP 2021-09-09 19:28:03
how check the time of operation in laravel
$timeStart = microtime(true); App::finish(function() use ($timeStart) { $diff = microtime(true) - $timeStart; $sec = intval($diff); $micro = $diff - $sec; Log::debug(Request::getMethod() . "[" . Request::url() . "] Time: &q... Add solution -
PHP 2021-09-03 16:47:03
time now with milliseconds php
//Timing executation time of script $startTime = microtime(true); //get time in micro seconds(1 millionth) usleep(250); $endTime = microtime(true); echo "milliseconds to execute:". ($endTime-$startTime)*1000; Add solution -
PHP 2021-08-30 06:19:01
php check timeout
//place this before any script you want to calculate time $time_start = microtime(true); //sample script for($i=0; $i<1000; $i++){ //do anything } $time_end = microtime(true); $execution_time = ($time_end - $time_start); echo '<b>Total Execut... Add solution