A little ahile ago we where hacked and as a result the hosting company made us lock down the folders, which in honesty was fair enough as they werent secure.
Anyway, we have an admin system that uploads hotels to the server, and since we have secured the image folders, we cant upload images using the code below, as we get this error.
this is the code here:
Its creating a lot of problems, as we now have to not upload any images so the code kicks in for no image being uploading, and then i have to upload the image to the image folder via FTP and then go into cpanel and cut and paste the image name in.
Cheers
Anyway, we have an admin system that uploads hotels to the server, and since we have secured the image folders, we cant upload images using the code below, as we get this error.
Code:
Warning: copy(imgdata/hotel/6702Fram.gif) [function.copy]: failed to open stream: Permission denied in /home/checksaf/public_html/en/admin1212/admin_hotels.php
this is the code here:
Code:
$src1=$_FILES['file1']['tmp_name'];
$fname1=rand(0,9999).$_FILES['file1']['name'];
$src2=$_FILES['file2']['tmp_name'];
$fname2=rand(0,9999).$_FILES['file2']['name'];
$src3=$_FILES['file3']['tmp_name'];
$fname3=rand(0,9999).$_FILES['file3']['name'];
$src4=$_FILES['file4']['tmp_name'];
$fname4=rand(0,9999).$_FILES['file4']['name'];
copy("$src1","imgdata/hotel/$fname1");
copy("$src2","imgdata/hotel/$fname2");
copy("$src3","imgdata/hotel/$fname3");
copy("$src4","imgdata/hotel/$fname4");
Its creating a lot of problems, as we now have to not upload any images so the code kicks in for no image being uploading, and then i have to upload the image to the image folder via FTP and then go into cpanel and cut and paste the image name in.
Cheers