kopia lustrzana https://github.com/magicbug/Cloudlog
Less code to get the max post size from php.ini :)
rodzic
645eb395ce
commit
5eff3f015b
|
@ -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');
|
||||
|
|
|
@ -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>
|
||||
|
|
Ładowanie…
Reference in New Issue