saving path in the database
Posted: Mon Dec 18, 2006 10:12 am
Can anyone tell me why is not working.
the problem is that file is being uploaded on a diffrent folder
and it is not saving the path in the database
i want the file to be upload it in this folder
("/home/townsfin/public_html/business_images/ ")
and instead it is being send to this folder
("/home/townsfin/public_html/")
on top of that it is not saving the path in the database for the file
here is my code
the problem is that file is being uploaded on a diffrent folder
and it is not saving the path in the database
i want the file to be upload it in this folder
("/home/townsfin/public_html/business_images/ ")
and instead it is being send to this folder
("/home/townsfin/public_html/")
on top of that it is not saving the path in the database for the file
here is my code
Code: Select all
<?php
$uploaddir = realpath ("/home/townsfin/public_html/business_images/ ");
$uploadfile = $uploaddir . basename($_FILES['Picture1']['name']);
if(!empty($_FILES['Picture1']))
{
var_dump($uploaddir);
var_dump($_FILES['Picture1']['size']);
var_dump($_FILES['Picture1']['error']);
var_dump($_FILE);
var_dump($_FILES['Picture1']['type']);
var_dump($_FILES['Picture1']['name']);
}
if (move_uploaded_file($_FILES['Picture1']['tmp_name'], $uploaddir .$_FILES['Picture1']['name']))
{
echo("File Uploaded");
echo("$uploaddir");
echo("$uploadfile");
}
else
{
echo ("file no uploaded!");
print_r($_FILES);
echo realpath('./');
}
?>