Gd2 est également activé. J'ai essayé plusieurs façons ... ne sais pas quel est le problèmeCODEIGNITER: Votre serveur ne prend pas en charge la fonction GD requise pour traiter ce type d'image.
Une erreur PHP a été rencontré Gravité: Avis Message: getimagesize(): Erreur de lecture! Nom du fichier: bibliothèques/Image_lib.php Numéro de ligne: 1651
Backtrace: Fichier: /opt/lampp/htdocs/ciflix/application/controllers/Admin.php Ligne: 52 Fonction: Bibliothèque de fichiers:/opt/lampp/htdocs/ciflix/index.php ligne: 315
Fonction: require_once
L'image fournie est pas valide.
Votre serveur ne prend pas en charge la fonction GD requise pour traiter ce type d'image.
$config['upload_path'] = $path;
$config['allowed_types'] = $allowed_types;
$config['max_size'] = 15000;
$config['max_width'] = 1024;
$config['max_height'] = 768;
$this->load->library('upload', $config);
if(!$this->upload->do_upload('userfile')){
$this->session->set_flashdata('file_error', $this->upload->display_errors());
redirect('admin/create_blog');
}else{
$data = $this->upload->data('userfile');
$config['image_library'] = 'gd2';
$config['source_image'] = $path.$data['userfile'];
$config['create_thumb'] = FALSE;
$config['maintain_ratio'] = FALSE;
$config['width'] = 200;
$config['height'] = 200;
$config['new_image'] = $path.$data['userfile'];
$this->load->library('image_lib', $config);
if(!$this->image_lib->resize()){
echo $this->image_lib->display_errors();
exit();
} else {
echo "Working";
exit();
}
$post_image = $_FILES['userfile']['name'];
}
Vous devez activer l'extension 'GD' de' php.ini' –
avez-vous redémarré apache2? –
Did, mais n'a pas travaillé extension = php_gd2.dll – flixy