ציטוט:
נכתב במקור על ידי meshuga
שמע הקוד שלך ממש מלא שגיאות..
א. אין כזאת פונקציה imagecreatefromdir לא יודע מאיפה המצאת אותה...
ב. בתוך הלולאה, הקובץ שלך הוא $file ולא $wh, $wh זה הנתיב לתקייה של התמונות..
ג. אף פעם לא ניסיתי, אבל אני כמעט בטוח, אתה לא יכול להדפיס מספר תמונות באותו דף..
ד. למה עשית את המשתנה $dir
|
קצת תיקונים בהקשר למה שאמרת
PHP קוד:
$logofiles="logo.png";
$wh = "upload/";
if (is_dir($wh)) {
if ($dh = opendir($wh)) {
while (($file = readdir($dh)) !== false) {
list($w,$h)=getimagesize($logofiles);
list($wsh,$hw)=getimagesize($file);
$image = imagecreatefromdir($file);
$logofile= imagecreatefromdir($logofiles);
imagecopymerge ($image, $logofile, ($wsh-$w), ($hw-$h), 0, 0, $w, $h,100);
imagegif ($image,$file);
}
closedir($dh);
}
}
Same errors...