tim101011 Posted October 28, 2007 Share Posted October 28, 2007 I have a page where a user can select a file to upload from there computer and then when submit is clicked some PHP code on another page uploads it to the server. However, if the file is larger than 2MB I do not want the PHP code to even attempt to upload it to the server. Is there a quick and simple way of checking the size of a file using PHP? Quote Link to comment https://forums.phpfreaks.com/topic/75109-checking-the-size-of-files/ Share on other sites More sharing options...
trq Posted October 28, 2007 Share Posted October 28, 2007 Because php runs server side, it can't check the file for anything until the file is on the server. Quote Link to comment https://forums.phpfreaks.com/topic/75109-checking-the-size-of-files/#findComment-379902 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.