Problems when hosting
Posted: Thu May 13, 2010 7:58 am
Hi All,
I'm using this code to edit movie image. this should upload the image to the Images/Movie/ folder however it is not woking. The filename is being updated in the database but the image is found no where.
I tested this site on my wamp server and it is working. When hosting online it is not.
Any Help please?
I'm using this code to edit movie image. this should upload the image to the Images/Movie/ folder however it is not woking. The filename is being updated in the database but the image is found no where.
I tested this site on my wamp server and it is working. When hosting online it is not.
Any Help please?
Code: Select all
if (strlen($image['name']) > 0) {
//checking if image is JPG
if ($image['type'] == "image/jpeg" || $image['type'] == "image/pjpeg") {
$filename = $image['name'];
//uploading the file
move_uploaded_file($image['tmp_name'], "Images/Movies/" . $image['name']);
//remove old image
if (strlen($currentimage) > 0)
unlink("Images/Movies/" . $currentimage);
} else {
$message = "Only .jpg images are allowed to be uploaded";
}
}