How can i rename file with current date ( month/years/minute/secondes.file_extension ) in the code from:
file-upload-script-not-work-t214.htm#p687
Rename file with current date, after upload
-
- Posts:39
Rename file with current date, after upload
Admin
Posts:805
Try to use the code from this example:
Code: Select all
$fname ='file-name.ext';
$set_name = date('Y-m-d-H-i-s');
$fname = preg_replace('/(.+?)\.([^\.]+)$/i', $set_name .'.$2', $fname);
echo $fname; // 2016-10-25-18-35-56.ext
Similar Topics
- Change the max upload size in XAMPP
PHP - MySQL First post
Pleassant Marplo, hope all things are okey ?Last post
I have a question, I think I have server problem with uploading maximal upload-file (mb) is to less I...
Marplo in once thanks for the great suport - GET_id not working in UnLink (delete file)
PHP - MySQL First post
I searching for an hour for a solution; unlink seems not to work with GET idLast post
<?php
$id = (int) $_GET ;
echo $_GET ;
$file = fopen( '.$_GET...
Here is an answer `o god after 2 hours shame on me for this one`
<?php
$file_pointer = $_GET .'.txt';
if (!unlink($file_pointer)) {
echo (...