Salve ragazzi,
ho una immagine che ridimensiono e voglio farla apparire all'interno di una tabella; perchè quando lancio la pagina mi restituisce una sequenza di caratteri, mentre senza la tabella(tutto il codice html) l'immagine viene mostrata ridotta e perfetta??
Ecco il codice:
<?php
header('Content-type: image/jpeg');
// The file
$filename = 'foto.jpg';
$percent = 0.3;
// Content type
list($width, $height) = getimagesize($filename);
$new_width = $width * $percent;
$new_height = $height * $percent;
// Resample
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
// Output
echo"
<html>
<head>
<title>Foto</title>
</head>
<body>
<table width=\"100%\" height=\"255\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td></td>
<td><div align=\"center\">";
imagejpeg($image_p, null, 100);
echo" </div></td>
<td></td>
</tr>
</table>
</body>
</html>
";
?>
HELP ME!!!![]()