交流
讨论:怎么我的copy不能用~十万火急
作者 hzg12 发布于 0000-00-00 分类:php基础编程
源代码如下:
<?php
$file="C:\Program Files\Apache Group\Apache\htdocs";
if (copy($userfile, $file))
{
echo("File stored successfully as $file.");
} else
{
echo("Could not save file as $file!");
}
?>
已经建立了一个浏览页面~但是我上传之后~他先是的是错误提示~即输出的是Could not save file as C:\Program Files\Apache Group\Apache\htdocs~那位大大指点一下~感激ing!!!!
逛论坛交流:怎么我的copy不能用~十万火急
相关讨论话题
-
使用copy 要配置php.ini 给你个例子你试试 多文件上传的例子 //upload_html.php---------------------------------------------------------------------------------------------
上传文件 <script> function beforesubmit(forma) { var indexnamea=forma.indexname.value; var upfilea=forma.upfile.value; var k=/ /g; var indexnamea=indexnamea.replace(k,""); var upfilea=upfilea.replace(k,""); if(indexnamea=="" || upfilea=="") { alert("目录名称或上传的目录不能为空!"); return false; } return true; } </script>


4 条回复
回复