PHP swfupload图片上传的实例代码
PHP代码如下:
代码如下:
if (isset($_FILES["Filedata"]) || !is_uploaded_file($_FILES["Filedata"]["tmp_name"]) || $_FILES["Filedata"]["error"] != 0) { $upload_file = $_FILES['Filedata']; $file_info = pathinfo($upload_file['name']); $file_type = $file_info['extension']; $save = 'image/' . md5(uniqid($_FILES["Filedata"]['name'])) . '.' . $file_info['extension']; $name = $_FILES['Filedata']['tmp_name']; if (!move_uploaded_file($name, $save)) { exit; } //将数组的输出存起来以供查看 $fileName = 'test.txt'; $postData = var_export($file_info, true); $file = fopen('' . $fileName, "w"); fwrite($file,$postData); fclose($file); }
例包下载
相关推荐
songshijiazuaa 2020-09-24
zyyjay 2020-11-09
xuebingnan 2020-11-05
samtrue 2020-11-22
stefan0 2020-11-22
yifangs 2020-10-13
hebiwtc 2020-09-18
天步 2020-09-17
83911535 2020-11-13
whatsyourname 2020-11-13
zhouyuqi 2020-11-10
Noneyes 2020-11-10
mathchao 2020-10-28
王志龙 2020-10-28
wwwsurfphpseocom 2020-10-28
diskingchuan 2020-10-23
savorTheFlavor 2020-10-23