假设我将max_file_size
设置为max_file_size
,但是我只想在特定文件上将其限制为4mb,我将如何实现呢?
Try this.
$default_max_file_size = ini_get('upload_max_filesize');
if ($is_special_file) {
ini_set('upload_max_filesize', '4M');
// process your file
// set it back to original value
ini_set('upload_max_filesize', $default_max_file_size);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.