hi,
i got the problem when i try to upload an image.
Warning: open_basedir restriction in effect. File is in wrong directory in /usr/local/psa/home/vhosts/domain.com/httpdocs/modules/Match/preview.php on line 12
Warning: getimagesize: Unable to open \'/tmp/php8cqDsv\' for reading. in /usr/local/psa/home/vhosts/domain.com/httpdocs/modules/Match/preview.php on line 12
what\'s i going to do?
here is a part of my code.
please help!!!tahnk you!!!
if ($image != \'none\') {
$imgsize = getimagesize($image);
switch($imgsize[2]) {
case 1:
$will_allow = \"yes\";
break;
case 2:
$will_allow = \"yes\";
break;
}
if ($will_allow != \"yes\") {
echo \"<br><br><center>Please upload only .jpg or .gif files</center>\";
die ;
}
}
if ($image == \'none\') {
echo \"<center><table width=75%><tr><td><img src=images/classifieds/no.gif width=250></td>\";
}
else {
$filesize2 = filesize($image);
$file_size2 = round($filesize2 / 1024 * 100) / 100 . \"\";
if ($file_size2 > \"1000.0\") {
print \"<center>Image is too large</center>\";
die;
}
$data = addslashes(fread(fopen($image, \"r\"), filesize($image)));
$result=mysql_query(\"INSERT INTO \".$prefix.\"_match_img values(\'\',\'$data\',\'$image\',\'$filesize\')\");
regards,
jane