Uploading images
Posted: Mon Jan 26, 2009 1:24 pm
i have a page that allows people to upload an image. what happens after they upload it it gets set with the user and group apache what i would like to have it do is upload it with a user and group that i specify such as webuser.
here is the code that i user to upload the images.
i think i need to add it to the end of my move_uploaded_file but i could be wrong.
thanks
here is the code that i user to upload the images.
Code: Select all
$ran = date("dmY");
$ran2 = $ran.".";
$target = "../inc/images/events/";
$target = $target . str_replace(" ", "", $_POST['eventname']).$ran2.$ext;
move_uploaded_file($_FILES['eventimage']['tmp_name'], $target);
$eventimage = str_replace(" ", "", "events/".$_POST['eventname']).$ran2.$ext;thanks