chmod
This commit is contained in:
@@ -155,12 +155,12 @@ class Compactsop extends MY_Controller{
|
|||||||
$filename = random_string('alnum', 15).'.'.$extension;
|
$filename = random_string('alnum', 15).'.'.$extension;
|
||||||
$source = $_FILES['image_file']['tmp_name'];
|
$source = $_FILES['image_file']['tmp_name'];
|
||||||
$target = $savePath.$filename;
|
$target = $savePath.$filename;
|
||||||
|
chmod($target, '0777');
|
||||||
rename($source, $target );
|
rename($source, $target );
|
||||||
//TODO: unlink eventueel oud logo
|
//TODO: unlink eventueel oud logo
|
||||||
$logo = $this->Schooldetails_model->getLogo($schoolID);
|
$logo = $this->Schooldetails_model->getLogo($schoolID);
|
||||||
$padNaam = $savePath.$logo;
|
$padNaam = $savePath.$logo;
|
||||||
|
unlink($padNaam);
|
||||||
// unlink($padNaam);
|
|
||||||
$this->Schooldetails_model->update_record_where(['logo'=>$filename], ['organisatie_id' =>$schoolID]);
|
$this->Schooldetails_model->update_record_where(['logo'=>$filename], ['organisatie_id' =>$schoolID]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ class Compactsop extends MY_Controller{
|
|||||||
$savePath = MYROOTPATH.'public/images/logos/';
|
$savePath = MYROOTPATH.'public/images/logos/';
|
||||||
$logo =$this->Schooldetails_model->getLogo($schoolID);
|
$logo =$this->Schooldetails_model->getLogo($schoolID);
|
||||||
$padNaam = $savePath.$logo;
|
$padNaam = $savePath.$logo;
|
||||||
chmod($padNaam, '0777');
|
|
||||||
$this->json($padNaam);
|
$this->json($padNaam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user