Your file size will only be limited by PHP max upload size from the ini file.
You can limit the size you accept the way you’re suggesting. Alternatively you can use the filesize() function. If you tell your users 100k is the max, then be fair and compare with 100*1024.
Be sure to notify your users correctly when you reject the upload.
file_uploads = On
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 300s
memory_limit = 128M
file_uploads = To allow HTTP file uploads.
upload_max_filesize = Maximum allowed size - uploaded files
max_execution_time = Maximum execution time for each script,( Seconds )
memory_limit = Maximum amount of memory a script may consume (128MB)
post_max_size = Maximum size of POST data that PHP will accept.Its value may be 0 to disable the limit.
It is ignored if POST data reading is disabled through enable_post_data_reading.