Hi,
I had written a small program in php, which will allow a user to upload an image to the database. My question is whether can i locate the directory of the image from where it was uploaded from?
this is part of the code for uploading:
"
// Do this process if user has browse the
// file and click the submit button
if ($_FILES)
{
$image_types = Array (
"image/bmp",
"image/jpeg",
"image/pjpeg",
"image/gif",
"image/x-png",
"application/octet-stream");
if (is_uploaded_file ($_FILES))
{
$userfile = addslashes (fread
(fopen ($_FILES["userfile"]["tmp_name"], "r"),
filesize ($_FILES["userfile"]["tmp_name"])));
$file_name = $_FILES["userfile"]["name"];
$file_size = $_FILES["userfile"]["size"];
$file_type = $_FILES["userfile"]["type"];
"
any help will be greatly appreciated!
tristan