john010117 Posted April 25, 2007 Share Posted April 25, 2007 I've retrieved a multiple file upload code sample from php.net and extended/modified it to suit my needs (that uses arrays). For some reason, it uploads and moves the file from the temp directory to the folder I specified, but I get this error: Warning: basename() expects parameter 1 to be string, array given in... And here's the part of the code that I'm having trouble with. <?php $upload_dir = "images/"; $upload_file = $upload_dir . basename($_FILES['comicfile']['tmp_name']); $filename = $_FILES['comicfile']['name']; ?> (I just put the PHP tags in to help others be able to read the code clearly) I've also tried pathinfo(), but to no avail. Can anybody help please? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.