1.PHP版怎么使用kindeditor4.1批量上传组件
PHP版怎么使用kindeditor4.1批量上传组件
将upload_json.php中的源码一段改为:$save_date = date("YmdHis");//新文件名
$new_file_name = $save_date . '_' . rand(, ) . '.' . $file_ext;
//移动文件
$file_path = $save_path . $new_file_name;
$savePath .= $new_file_name;
if (move_uploaded_file($tmp_name, $file_path) === false) {
alert("上传文件失败。");
}else{
#####存储文件路径#####
$saveDatas = array('path'=>$savePath,切换nodejs实战案例 源码 'date'=>$save_date);
$mysql->addFile($saveDatas);
if(!empty($_GET['type'])){
$type = $_GET['type'];
header("Location:../list_up_file.php?type={ $type}");
}
}
@chmod($file_path, );
$file_url = $save_url . $new_file_name;
header('Content-type: text/html; charset=UTF-8');
$json = new Services_JSON();