PHP programmer Posted March 16, 2019 Share Posted March 16, 2019 Hello, I am trying to upload images with php...I followed the instructions step by step and it just not working...The following error code is Warning: getimagesize(): Filename cannot be empty in: ..............I copied the code from here. Link to comment Share on other sites More sharing options...
Patriboom Posted March 25, 2019 Share Posted March 25, 2019 Or you sure your server has rights to read / write the image ? Under Linux, use chown and chmod to adjust the rights. Link to comment Share on other sites More sharing options...
Patriboom Posted March 25, 2019 Share Posted March 25, 2019 Is your form your sending from properly configured ? Your form must be multipart/form-data <form action="upload.php" method="post" enctype="multipart/form-data"> Link to comment Share on other sites More sharing options...
justsomeguy Posted March 25, 2019 Share Posted March 25, 2019 For whatever reason the filename you're sending to getimagesize is empty. If you copied that code without changing it then that could mean the file was too large. The code they have doesn't really do any error checking. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now