I found a good function on github for uploading images using php, but I do not know one of its arguments.
upload_image($_FILES,'file',250,'city',500,'../../uploaded/',1048576);
Function on Github
Considering the lines:
$file[$fileIndex]['tmp_name']
$file[$fileIndex]['error']
$file[$fileIndex]['name']
$file[$fileIndex]['type']
$file[$fileIndex]['size']
$file is a three-dimensional array, composed of arrays of name, tmp_name, type, size, error.
It is the kind of array you see when uploading files in PHP.
It calls move-uploaded-file, which moves an uploaded file to a new location.
This function checks to ensure that the file designated by filename is a valid upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism).
If the file is valid, it will be moved to the filename given bydestination.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With