|
Posted by Kirilenko on 07/01/06 14:26
1. I have MAX_FILE_SIZE listed in the form. If the file is over that
size, the file doesn't upload, but what variable is used to check
that? I have tried ($file is the variable of the file)
$file_size>512000 but that doesn't work, as $file_size is 0. I gather
that is because the file doesn't upload none of the $file variables
have values. I want to be able to inform the user that the file didn't
upload because of that.
2. Is there a way to check the file-type before uploading it (similar
to MAX_FILE_SIZE for size). I know the file still uploads, but it
wouldn't store it on the server. Is there anyway to just accept
image/jpeg and image/pjpeg? Currently I use $file_type to determine
the type and if it's not of type image/jpeg or image/pjpeg I delete it
using unlink. Also why do JPG files have 2 different types and all
other image formats just one?
3. I didn't think you needed to use unlink if you used
move_copied_file to move the files you uploaded, but someone recently
told me that you did. Do you need to use it?
Thankyou in advance.
Navigation:
[Reply to this message]
|