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

distinct rows
Hi
version 10.2.0.3

I have a query output something like the following

ID

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

PHP XML extraction text
I would like to extract an xml text and have that text directly echo(print) out on my web page. Her

How to add an image/C++ OpenGL?
Hi,

I have been trying to look online for this and, so far, I haven't found anything usef

Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't unders

function not returning the correct value
I have a program that needs to return a value from a function. I have an output statement inside the

PHP hyperlinks generator
Hi

I need some help to get this done using php:


1 - I have few hyperlinks say 500

Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sit

Getting a variable to work in function params
I have this fuction which is inside a class:

Code: public static function generateEmbedCode($

generate seo frienly url from a text like wordpress
Convert: "åäö" to "aao", "space" to "-", "!?&q

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