function uploadFile() {
global $attachments;
while(list($key,$value) = each($_FILES[images][name]))
{
if(!empty($value))
{
$filename = $value;
//the Array will be used later to attach the files and then remove them from server ! array_push($attachments, $filename);
$dir = "/home/blah/Music/$filename";
chmod("/home/blah/Music",0777);
$success = copy($_FILES[images][tmp_name][$key], $dir);
}
//
}
//
if ($success) {
echo " Files Uploaded Successfully<BR>";
//
}else {
exit("Sorry the server was unable to upload the files...");
}
//
}
試圖上傳文件,然後使用PHP梅勒PHP文件上傳提交打開流
錯誤將其作爲沿着郵件附件:
Warning: copy(/home/blah/Music/Aerial_view_of_Yamuna_Expressway.jpeg): failed to open stream: Permission denied in /opt/lampp/htdocs/UI/user/joinmeeting.php on line 292
更新時間:
[email protected]:~$ ls -la for /home/blah/Music
ls: cannot access for: No such file or directory
/home/blah/Music:
total 8
drwxr-xr-x 2 blah blah 4096 Jul 4 10:20 .
drwxr-xr-x 67 blah blah 4096 Sep 21 10:18 ..
爲什麼我的linux系統不允許複製文件?
因爲您沒有權限。 –