Less code to get the max post size from php.ini :)

pull/273/head
Peter Goodhall 2019-05-16 16:19:56 +01:00
rodzic 645eb395ce
commit 5eff3f015b
2 zmienionych plików z 2 dodań i 5 usunięć

Wyświetl plik

@ -106,10 +106,7 @@ class adif extends CI_Controller {
{
$data['error'] = $this->upload->display_errors();
$max_upload = min(ini_get('post_max_size'), ini_get('upload_max_filesize'));
$max_upload = str_replace('M', '', $max_upload);
$data['max_upload'] = $max_upload * 1024;
$data['max_upload'] = ini_get('upload_max_filesize');
$this->load->view('interface_assets/header', $data);
$this->load->view('adif/import');

Wyświetl plik

@ -26,7 +26,7 @@
<button type="submit" class="btn btn-primary mb-2" value="Upload">Upload</button>
</form>
<p><span class="badge badge-warning">Warning</span> Maximum file upload size is <?php echo $max_upload; ?> MB.</p>
<p><span class="badge badge-warning">Warning</span> Maximum file upload size is <?php echo $max_upload; ?>B.</p>
</div>
</div>