欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

网站-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?>


上传失败!

文件不存在,过大或不允许该扩展名。

重新上传


返回首页 Powered by Straysky

上传成功!

文件代码:
标准:
HTML:

图片代码:
论坛:
HTML:

继续上传


返回首页 Powered by Straysky

4、

  
相关标签: php 网站