I'm trying to load image
from url
.
Everything works fine in localhost
.
When I run the code on my webserver it is saying
Warning: file_get_contents(url): failed to open stream: Permission denied in /home/www/ .../imageup.php on line 64
I've searched on google
and tried with many answers from stackoverflow
.
Everyone is saying to set proper permission
to the file and folder.
I've set the permission
for the php file
and the folder to 777
.
Some answers saying to run some commands but I can't find the console to run that code so I allowed permission manually.
I can understand that there is something with permission but can't figure out. (Someone may say this is an duplicate and may be it is, but I am fail to find solution)
$file = file_get_contents($image['src']);