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