Hi,
I am having trouble passing a file to a function. User uploads a file. If I manage the file directly, without a function, things work fine:
echo "Uploaded file size was $userfile_size";
returns the size of the uploaded file.
But if I try to manage the file within a function:
function processImage($userfile) {
if (is_uploaded_file($userfile) {
echo "Uploaded file size was $userfile_size";
// more stuff here
}
}
processImage($userfile);
No file size is returned, even though I get the message "Uploaded file size was ", proving that the is_uploaded_file function correctly got the $userfile variable. I also cannot do other functions on the file, like ResizeImageUsingGD($userfile).
Any idea as to what gives?
Thanks in advance!
asher