请问这个函数为什么上传不了?
function upfoto($path, $rmuno, $fromfile, $fname, $fotofile, $exds=".jpg|.jpeg|.png|.bmp|.gif|.eml|.rar", $maxsize="122880") #120KB
{
// if(filesize($fromfile)>$maxsize)
if($_FILES['$fromfile']['size']>$maxsize)
return("filesize exceed ".(ceil(10*($maxsize/1024))/10)."KB");
$fotofile = $rmuno."/".$fname;
$fotopath = $path.$fotofile;
if(!file_exists($path.$rmuno)) mkdir($path.$rmuno,0777);
$extends = "/(.+)(".str_replace(".", "\.", $exds).")$/i";
if(preg_match($extends, $fotofile)){
echo $fotopath;
if(!copy("$fromfile", "$fotopath")) return("photo upload fail");
}else{
$fotofile="";
return("unsupport photo filename");
}
return;
}
其中函数的第三个参数是传人的文件表单名字。出错提示:
Warning: copy(Array): failed to open stream: No such file or directory in F:\project\superstars\chi\inc\gufunc.php on line 103
photo upload fail
{
// if(filesize($fromfile)>$maxsize)
if($_FILES['$fromfile']['size']>$maxsize)
return("filesize exceed ".(ceil(10*($maxsize/1024))/10)."KB");
$fotofile = $rmuno."/".$fname;
$fotopath = $path.$fotofile;
if(!file_exists($path.$rmuno)) mkdir($path.$rmuno,0777);
$extends = "/(.+)(".str_replace(".", "\.", $exds).")$/i";
if(preg_match($extends, $fotofile)){
echo $fotopath;
if(!copy("$fromfile", "$fotopath")) return("photo upload fail");
}else{
$fotofile="";
return("unsupport photo filename");
}
return;
}
其中函数的第三个参数是传人的文件表单名字。出错提示:
Warning: copy(Array): failed to open stream: No such file or directory in F:\project\superstars\chi\inc\gufunc.php on line 103
photo upload fail
...全文
相关推荐
小米随身wifi为什么创建不了?小米wifi创建失败解决方法
自上市以来,小米随身WIFI即受到众多米粉支持和喜爱,插上电脑或笔记本后,点一下打开,你的手机、平板就能连上WiFi。但很多朋友都碰到了小米wifi创建失败的情况,小米随身wifi为什么创建不了呢?下面小编就为大家介绍解决方法,一起来看看吧
Firefox高效浏览利器:Vimperator插件深度配置指南
Vimperator是一款专为Firefox浏览器设计的键盘驱动型插件,其设计灵感源自Vim文本编辑器的高效操作模式。它通过引入普通模式(Normal Mode)插入模式(Insert Mode)和命令行模式(Command Mode)的三重状态机制,将键盘作为唯一交互媒介,彻底摆脱对鼠标的依赖。这种类终端式的浏览体验特别适用于开发者、系统管理员和高频网页操作者,能够在标签切换、页面滚动、书签管理等场景中显著提升效率。" 结合命令使用📌 参数说明:表示全局变量作用域;
java读取pdf(怎么就上传不了呢)
java读取pdf,怎么就上传不了呢怎么就上传不了呢怎么就上传不了呢怎么就上传不了呢
flcq.rar_为什么我的空间上传不了rar
我的空间不支持放rar文件,所以又借贵站宝地上传一个登录器,希望能放行.
为什么小程序用不了是什么原因?.docx
.为什么小程序用不了是什么原因?.docx


基础编程
