Hi, i'm trying to upload a file but when i view the file i get the error:
You don't have permission to access /images/image.gif on this server.
The code works perfectly locally but not online. I checked the permissions on the image and it was set to 600 and when i set it to 644 (via ftp) it displayed fine.
Therefore i figured i could change the permissions using php so i added a chmod line below my move_uploaded_file like so:
move_uploaded_file($temp_file, $path . $file_name);
chmod($path . $file_name, 644);
But this gave me a permissions error even though i have set my images folder to 777.
Appreciate if someone could help. Thanks
You don't have permission to access /images/image.gif on this server.
The code works perfectly locally but not online. I checked the permissions on the image and it was set to 600 and when i set it to 644 (via ftp) it displayed fine.
Therefore i figured i could change the permissions using php so i added a chmod line below my move_uploaded_file like so:
move_uploaded_file($temp_file, $path . $file_name);
chmod($path . $file_name, 644);
But this gave me a permissions error even though i have set my images folder to 777.
Appreciate if someone could help. Thanks