Answer the question
In order to leave comments, you need to log in
Why does an Internal Server Error occur when uploading a pdf file to a site?
Hello! There was a following problem. When loading some files with pdf extensions, an
Internal Server Error appears. Some files load well and some don't. I will attach the processing code.
$config['upload_path'] = './assets/books/';
$config['allowed_types'] = '*';
$config['max_size'] = 0;
$config['max_width'] = 0;
$config['max_height'] = 0;
$config['min_width'] = 0;
$config['min_height'] = 0;
$config['max_filename'] = 0;
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload('book'))
{
echo "Не получалось загрузить книгу";
die();
}
else
{
$data = array('upload_data' => $this->upload->data());
$up['book_url'] = $data['upload_data']['file_name'];
// print($up['book_url']);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question