Search code examples
phpimagefileupload

Upload Image to Directory


How to upload an image to a folder without using move_uploaded_file() in PHP ?

Because we are not allowed to upload files to our server but I needed it just to upload an image to "assets/images" and remove it later. Thanks for the help in advance.


Solution

  • When you don't have permission to write files, you can't do it. But if you have a database, you can use an alternative method: Convert the file to a base64 string and store it in a database field