Image upload problem
Posted: Fri Sep 25, 2009 4:00 am
Hi all,
Having a bit of a problem with an image upload page ive created. basically i have an admin control panel ive created for my site. you login and can add items to the main site. now the file directories look like this:
home/images/items < This is where the item images should go
home/admin/ < this is where the admin control panel is based.
Now when i load up the admin page and go to upload an image I need to go back a directory and into the images/items directory. So for my new location variable ive tried using:
$newname = "..\images\items\\" . $newfilename . "." . $ext;
ive also tried:
$newname = ".\images\items\\" . $newfilename . "." . $ext;
but neither work, they just create the image as ..blarblar.jpg
this worked fine on my localhost but now it is live on my webhost this what happens, this is probably quite simple. any help is much appreciated!
Having a bit of a problem with an image upload page ive created. basically i have an admin control panel ive created for my site. you login and can add items to the main site. now the file directories look like this:
home/images/items < This is where the item images should go
home/admin/ < this is where the admin control panel is based.
Now when i load up the admin page and go to upload an image I need to go back a directory and into the images/items directory. So for my new location variable ive tried using:
$newname = "..\images\items\\" . $newfilename . "." . $ext;
ive also tried:
$newname = ".\images\items\\" . $newfilename . "." . $ext;
but neither work, they just create the image as ..blarblar.jpg
this worked fine on my localhost but now it is live on my webhost this what happens, this is probably quite simple. any help is much appreciated!