本文整理汇总了PHP中JUtility::getMaxUploadSize方法的典型用法代码示例。如果您正苦于以下问题:PHP JUtility::getMaxUploadSize方法的具体用法?PHP JUtility::getMaxUploadSize怎么用?PHP JUtility::getMaxUploadSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JUtility
的用法示例。
在下文中一共展示了JUtility::getMaxUploadSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
}
};
');
?>
<legend><?php
echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_INSTALL_JOOMLA_EXTENSION');
?>
</legend>
<div class="control-group">
<label for="install_package" class="control-label"><?php
echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_EXTENSION_PACKAGE_FILE');
?>
</label>
<div class="controls">
<input class="input_box" id="install_package" name="install_package" type="file" size="57" /><br>
<?php
$maxSize = JHtml::_('number.bytes', JUtility::getMaxUploadSize());
?>
<?php
echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', $maxSize);
?>
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary" type="button" id="installbutton_package" onclick="Joomla.submitbuttonpackage()">
<?php
echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_AND_INSTALL');
?>
</button>
</div>
示例2:
<label for="upload-file" class="control-label"><?php
echo JText::_('COM_MEDIA_UPLOAD_FILE');
?>
</label>
</div>
<div class="controls">
<input required type="file" id="upload-file" name="Filedata[]" multiple /><button class="btn btn-primary" id="upload-submit"><span class="icon-upload icon-white"></span> <?php
echo JText::_('COM_MEDIA_START_UPLOAD');
?>
</button>
<p class="help-block">
<?php
$cMax = (int) $this->config->get('upload_maxsize');
?>
<?php
$maxSize = JUtility::getMaxUploadSize($cMax . 'MB');
?>
<?php
echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', JHtml::_('number.bytes', $maxSize));
?>
</p>
</div>
</div>
</fieldset>
<?php
JFactory::getSession()->set('com_media.return_url', 'index.php?option=com_media&view=images&tmpl=component&fieldid=' . $input->getCmd('fieldid', '') . '&e_name=' . $input->getCmd('e_name') . '&asset=' . $input->getCmd('asset') . '&author=' . $input->getCmd('author'));
?>
</div>
</form>
<?php
}