这是我的问题,当有人上传图像时,我需要重命名图像,我想使用日期和时间并创建 $datatime 值,但我不知道如何使它工作,有人能告诉我该怎么做吗?非常感谢任何帮助...非常感谢
<?php if(isset($_POST['action'])=='uploadfiles') {
$time = time();
$date = date('Y-m-d');
$datetime = "$time" . "$date";
$upload_directory ='uploads/';
$count_data =count($_FILES['data']) ;
$upload = $_FILES['data']['name'][$x].',';
for($x=0;$x<$count_data;$x++) {
$upload .= $_FILES['data']['name']["$x" . ""].',';
move_uploaded_file($_FILES['data']['tmp_name'][$x], $upload_directory . $_FILES['data']['name'][$x]); ##### upload into your directory }
//echo "upload successfully..";
$con="INSERT INTO inmuebles (foto1) values ('$upload')";
$query=mysql_query($con); } ?>