Can this => set_time_limit (), Die() be used to cancel a file Upload.
i.e When user clicks a button set_time_limit () function will execute.
Will it Stop the Upload?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You would be better to use a Javascript solution to accomplish this. Of course, since it is client-side people can get around it. If it is a security issue, don’t rely on Javascript. If you run Apache, you can try mod_reqtimeout, however this is for request headers, so I’m not entirely sure if the file upload will be part of this or not.
Edit:
There is also the Apache Timeout directive and KeepAliveTimeout which look more promising.
Edit2:
I just stumbled upon this. It seems like this is exactly what you are looking for (assuming PHP >= 5.4). And from one of the comments, for previous versions you can use this.