views:

20

answers:

2

i need to upload file without using a form. i need to do this to make automated upload if a user click a button...

i have create $_FILES['thefile']['name'] and $_FILES['thefile']['tmp'] but it still not working. is it possible to do uploading without a form ?

btw, i use wordpress. and wp use is_uploaded_file() to check whether the file a copy is an uploaded file or not.

+2  A: 

For security reasons this isn't allowed. You could embbed a java applet or flash to upload a file.

coding.mof
+1  A: 

Array $_FILES fills only where we use form with input element of "file" type.

Alexander.Plutov