File upload issues


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

Hi Guys,

Can anyone see any issues with this code:
Code: [Select]$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
153 Like 31 Dislike
Previous forums Next forums
Other forums

Object Interfaces
EDIT: Never mind, I just updated to php 5.

Hey all,

I'm currently experimenting with p

DB2 for z/OS, LUW, iSeries
Hello, In this forum a lot of threads related to other members of the DB2 family than DB2 for z/OS

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

grouping within a foreach?
hello all,

I currently have a list of products spit out from my db via a foreach loop. Right

Ajax Error since Upgrading to 3.5
Ever since upgrading my site to .NET 3.5 (I needed LINQ), I've been getting this annoying error on o

admin with my register system?
Hey i wana make it so i can make a admin level on my register system , I'm kinda new to php to im no

need help to creat database
Hello Team, please guys i am stuck from three days with paypal issue for IPN but no luck yet now i w

Why is this function returning a false value when it shouldn't be??
This is in an include file. I want it to check a value in an html form and see if it's just white s

Linux socket programming
Where can I find a good introduction to socket programming?

MS are the best!!!
Visit http://www.microsoft.com/australia/windows/default.aspx?h=watch-a-demo and click the massive '

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