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

Database 'Validation'
Hi everyone,
I'm trying to validate the password entered by the user with the password in the dat

MySql timezone
Code: $sql = "SELECT *, date_format(date, '%m/%d/%Y at %I:%i %p' )as date FROM comments WHERE t

PHP Include not working
The website is http://www.grlistingservices.com

The code block is as follows:

<

Multi Dimensional Array Append
Hi Guys

I have a function that returns a multidimentional array eg

$result = functio

cPanel API
Hi Guys,

Need a little guidance. I'm trying to get my script to communicate with cPanel (or W

Could Someone Please Debug This?
I was wondering if someone could debug this script for me. I realize it's not the tidest script (and

Embed Video Problem
Hey, thanks for looking!

File to be embedded:

Code: <playlist version="1&q

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

Displaying image from database
Hi,

I've got a site where that's got a database behind it. Currently it has loads of items in

Output Buffering question
Hi all,

I've been trying to wrap my head around output buffering. So far I've found tons 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