Hi.
I'm using a php upload script and it works fine(99%) anyway.
The problem is that I can upload files with spaces like
aa bb.jpg or something.
This is the code I'm using, maybee anyone knows what the problem is ?
snip ---
if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {
copy($HTTP_POST_FILES['userfile']['tmp_name'], "/home/user/tmp/file"
system ("mv /home/user/tmp/file /home/user/public_html/$tmpname"
end of snip ---
This will put the uploaded file in public_html with the real name of the file
It works fine if the file name is aabb.jpg but not with aa bb.jpg
Thanks.
I'm using a php upload script and it works fine(99%) anyway.
The problem is that I can upload files with spaces like
aa bb.jpg or something.
This is the code I'm using, maybee anyone knows what the problem is ?
snip ---
if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {
copy($HTTP_POST_FILES['userfile']['tmp_name'], "/home/user/tmp/file"
system ("mv /home/user/tmp/file /home/user/public_html/$tmpname"
end of snip ---
This will put the uploaded file in public_html with the real name of the file
It works fine if the file name is aabb.jpg but not with aa bb.jpg
Thanks.