请问php上传文件出错 求解!
本帖最后由 l34827584 于 2014-05-10 18:06:37 编辑 在windows下正常 但是linux 就提示移动文件失败 求救啊!
代码如下
轮播管理
:
标题:
轮播序号
1
2
3
链接:
$uptypes=array(
'image/jpg',
'image/jpeg',
'image/png',
'image/pjpeg',
'image/gif',
'image/bmp',
'image/x-png',
);
$max_file_size=2000000;
$destination_folder=../../img/slider/;
$filesname=$_post[title];
$id=$_post[id];
$link=$_post[linke];
if ($_server['request_method'] == 'post')
{
if (!is_uploaded_file($_files[upfile][tmp_name]))
//是否存在文件
{
echo 图片不存在!;
exit;
}
$file = $_files[upfile];
if($max_file_size //检查文件大小
{
echo 文件太大!;
exit;
}
if(!in_array($file[type], $uptypes))
//检查文件类型
{
echo 文件类型不符!.$file[type];
exit;
}
if(!file_exists($destination_folder))
{
mkdir($destination_folder);
}
$filename=$file[tmp_name];
$image_size = getimagesize($filename);
$pinfo=pathinfo($file[name]);
$ftype=$pinfo['extension'];
$destination = $destination_folder.time()...$ftype;