Is there a way to use PHP’s file_get_contents() function on a file that a user is trying to upload from their computer through the browser with a form?
Share
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.
Directly – no. This is not how PHP works – it runs entirely on server side.
After uploading – definitely! You can load the file using the
tmpfileelement in the$_FILESarray. See Handling File Uploads for more info.