Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我已max_file_size设置为 20mb,但我只想在特定文件上将其限制为 4mb,我将如何实现这一点?
max_file_size
尝试这个。
$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); }