php - Codeigniter failed to open stream permission when upload images -
code:
$filename = '12345.jpeg'; $source = imagecreatefromstring($imagedata); $imagesave = imagejpeg($source,$filename,100); imagedestroy($source); $this->ftp->connect(); $this->ftp->upload($imagesave,'/public_ftp/incoming/'.$filename,'ascii', 0775); $this->ftp->close();
error: codeigniter failed open stream permission when upload images.
probably permissions issue. try this:
sudo chmod -r 777 path/to/public_ftp/incoming/
however, give permission everyone. localhost ok. production environment should in way. check this answer more info
@edit
if getting error when trying upload file form. codeigniter documentation:
the upload folder
you'll need destination folder uploaded images. create folder @ root of codeigniter installation called uploads , set file permissions 777.
do have folder permissions set 777?
Comments
Post a Comment