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

Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about bec

Run function every 5 mins ??
I have a function PostMessage()

How can I run it every 5 mins ??

Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work

Need a Timecode Class...
Not a Time Stamp, Time Code. Format is a bit different. HH:MM:SS:FF where FF is Frames. I dont re

How to set pass login name from htaccess to php
When the user logs into my members page via htaccess, I'd like to retain the username so that I can

Match stored value with the current value in a loop
Hello,

I have a MySQL db were I store articles in.

I have a form to fill these article

What exactly is net neatrality?
What exactly is it? I think it's anti-censorship and... stuff... but I don't really understand it

Php WordPress help
I am writing the following code for making a plugin

<?php
header("Content-Type

dropdown menu
Hello everbody,

I am php newbie.
I need to develop a program that once click the drop do

Just a white page
Okay so, my website, when I click SignUp on it it takes me to /join.php but its a complete white pag

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