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

if php cookie set, show code...
Hi all.. I need to figure out this little snippet right quick.. seems like it should be easy enough

Struct/union and scope problem!
HI all , I have
Code: in header.h typedef struct Node Link; /* ---------

error with opendir
when i do this

if ($handle = opendir($dir)) {
while (false !== ($file = readdir($han

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

PHP search multiple input field box help
I am having a problem with my search script. At current it will simply search by a selected date whi

Email Form Syantax Issue 2
How to make this look FROM:"OUR TEAM" instead of FROM:abc@mail.com

$headers = "

Gantt Chart Tool
Does anyone know of a good free gantt chart creator tool

Thanks

Cron Job and Output
I have php codes running under a cron job.
But everytime i output (echo) , it comes out as comple

How to update this array?
I am saving a string that looks this: username1, username2, username3...
into a single cell in a

Must-Know Topics of PHP
Can you guys list the must-know topics of PHP. I am still a learner and I am trying to cover most of

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