网站-php上传文件出现错误,求大家解释一下,怎么修改?
程序员文章站
2022-04-26 19:44:06
...
php网站
一共四个文件:
1、
=SITE_NAME?>
=SITE_NAME?>
=SITE_ADV?>
2、
3、
0){ $uploadtype = false; switch($_FILES['uploadfile']['error']){ }}$suffix = strtolower(substr($_FILES['uploadfile']['name'],-4)); if(!valid_suffix($suffix)){ $uploadtype = false;} if($uploadtype === false){}else{$userip = ip2long($_SERVER['REMOTE_ADDR']);$time = time();$newpath = UPLOAD_DIR . $time .'x'. $userip . $suffix;if(is_uploaded_file($_FILES['uploadfile']['tmp_name'])){if(!move_uploaded_file($_FILES['uploadfile']['tmp_name'],$newpath)){$uploadtype = false;}else{$uploadtype = true;}}else{$uploadtype = false;}}if($uploadtype === false){}else{setcookie('uploaded',$time.'x'.$userip.$suffix.'|'.$_COOKIE['uploaded'],time()+3600*24*365);}?>
=SITE_NAME?>
=SITE_NAME?>
=SITE_ADV?>
上传失败!
文件不存在,过大或不允许该扩展名。
重新上传
上传成功!
文件代码:
标准:
HTML:
图片代码:
论坛:
HTML:
继续上传
4、
上一篇: Java中关于反射机制需要注意的事情
下一篇: Java 常见内存溢出异常与代码实现