faultCode1faultStringWarning:move_uploaded_file(../infos/upload/photo_1-immo65luz-1415182268.png) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/eq8115/eq79237/html/application_v2/index.php on line 75faultCode1faultStringWarning:move_uploaded_file() [function.move-uploaded-file]: Unable to move '/home/tmp/phpMTDMSQ' to '../infos/upload/photo_1-immo65luz-1415182268.png' in /home/eq8115/eq79237/html/application_v2/index.php on line 75modif
The above error is showing up when I try to add a photo in admin panel.
This is part of the code that is used for upload:
foreach ($_FILES as $k=>$photo){
//---- changement de nom
$nom_file = str_replace(".","_",$photo['name']);
$t_nom = split("_",$nom_file);
$ext = $t_nom[count($t_nom)-1];
$nom = "upload/".$k."-".$_SESSION['admin']."-".time().".".$ext;
if (move_uploaded_file($_FILES[$k]['tmp_name'],"../infos/$nom"))
{
$_POST[$k] = $nom;
}
}
Can anyone can help me?
Your error string already says that your directory don't have write permission.
Check the user permission of directory if not then You have to set it as 755 permission
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.