Grunge
Erfahrenes Mitglied
Hi,
ich will ein Bild-Uploaden mit hilfe dieses Codes:
und bekomme diese Fehlermeldung:
Kenn jemand helfen!?
ich will ein Bild-Uploaden mit hilfe dieses Codes:
PHP:
function createImage( $srcImg, $width, $height, $srcImg_info)
{
if( !is_resource($srcImg) || get_resource_type($srcImg) != 'gd' || !is_array($srcImg_info) ) {
return false;
}
$dstImg = imagecreatetruecolor($width, $height);
imagecopyresampled($dstImg, $srcImg, 0, 0, 0, 0, $width, $height, $srcImg_info[0], $srcImg_info[1]);
return $dstImg;
}
function upload_picture( $srcFilepath, $nick )
{
if( !file_exists($srcFilepath) || !is_readable($srcFilepath) ) {
return false;
}
$filename = $nick.'_'.time().'.jpg';
$imgDir = '/usr/export/www/hosting/web60/user_images';
$thumbDir = '/usr/export/www/hosting/web60/user_images/thumbnails';
$srcImg_info = getimagesize($srcFilepath);
$dstImg = createImage(ImageCreateFromJPEG($srcFilepath), 200, 250,$srcImg_info);
Imagejpeg($dstImg, $thumbDir.'/'.$filename, 72);
ImageDestroy($dstImg);
$dstImg = createImage(ImageCreateFromJPEG($srcFilepath), 640, 480,$srcImg_info);
Imagejpeg($dstImg, $imgDir.'/'.$filename, 72);
ImageDestroy($dstImg);
}
und bekomme diese Fehlermeldung:
Warning: imagejpeg() [function.imagejpeg]: SAFE MODE Restriction in effect. The script whose uid is 799 is not allowed to access /usr owned by uid 0 in /var/www/web60/html/g2g/_functions.php on line 65
Warning: imagejpeg() [function.imagejpeg]: Invalid filename in /var/www/web60/html/g2g/_functions.php on line 65
Warning: imagejpeg() [function.imagejpeg]: SAFE MODE Restriction in effect. The script whose uid is 799 is not allowed to access /usr owned by uid 0 in /var/www/web60/html/g2g/_functions.php on line 69
Warning: imagejpeg() [function.imagejpeg]: Invalid filename in /var/www/web60/html/g2g/_functions.php on line 69
Kenn jemand helfen!?