File upload issues


Posted on 16th Feb 2014 07:03 pm by admin

Hi Guys,

Can anyone see any issues with this code:
Code: $setImage= 'productimages/' . date(U) . $HTTP_POST_FILES['setImage']['name'][0];
copy($HTTP_POST_FILES['setImage']['tmp_name'][0], $setImage);
Its stripping the original file name (including the extension) fromt he end of the image and just giving it a unix timestamp for a name. Looking at the code I think I can see why its doing that but I can't see how to fix it.

Any help would be most appreciated

No comments posted yet

Your Answer:

Login to answer
152 Like 32 Dislike
Previous forums Next forums
Other forums

Download Image from URL and Upload it
Ok, I have been googling for the last 1/2 hour trying to figure this out, Most likely I'm just not s

upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as

insert mysql embeded videos as blobs?
Using TinyMCE my client will be able to embed images and flash videos into large columns of text whi

Hi, explode and strstr.
Hi, I seem to be confused about the strstr function, eg. i have a string like:
"a.b.c.d.e.f&

Sending a hyperlink through mail
HI all,
I am sending a mail to outlook mailbox of a user using FM SO_NEW_DOCUMENT_ATT_S

How to separate records and ORDER BY
Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and

in php, link returns to the line
When I add a link in a php page, the link word returns to the line (as a
would do)

Examp

Final year project, please point me in the right direction
hi there for my final year project I'm aiming to build a php script shell to use as an expert system

ORA-01655: unable to extend cluster SYS.C_FILE#_BLOCK# by 128
Hi all,

Oracle 10g. Linux.

I'm facing the below error while trying to import a dumpfil

split values
I have values that are returned to me in this format:

name=>test,age=>49

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash