![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
23/08/2002, 15:46
|
| | Fecha de Ingreso: junio-2002 Ubicación: Buenos Aires, Argentina
Mensajes: 876
Antigüedad: 22 años, 8 meses Puntos: 0 | |
Re: soy nuevito: AYUDA con manejo de fotos <html><head><title>TITULO DE PAGINA</title></head>
<body bgcolor="#FFFFFF">
<?
$picdir = "pics";
$height = "100";
$newwidth = "100";
$array = explode (".",$file_name);
$filename = $array[0];
$extension = strtolower($array[1]);
if($file_name == "")
{
echo "&nbsp;Bitte eine Datei ausw&auml;hlen:";
}
else
{
if(!(($extension == jpe) or ($extension == jpg) or ($extension == jpeg)))
{
echo "Sólo se permiten fotos del tipo JPG";
}
else
{
$smallimage = "fotoschicas"."/"."foto"."."."jpg&qu ot;;
@copy($file, "fotosgrandes"."/"."foto"."."."jpg&qu ot;);
echo "&nbsp;Die Datei wurde auf den Server &uuml;bertragen !";
if(@copy($file,"fotoschicas"."/"."foto"."."."jpg&qu ot;));
if(file_exists($smallimage))
{
$image = imagecreatefromjpeg("$smallimage");
$ywert=imagesy($image);
$xwert=imagesx($image);
$newheight = $height;
$newwidth = $width;
$destimage = imagecreate($newwidth,$newheight);
imagecopyresized($destimage, $image, 0, 0, 0, 0, $newwidth, $newheight,$xwert,$ywert);
imagejpeg($destimage,$smallimage);
}
}
}
?>
<form method="POST" action="<?php echo $PHP_SELF ?>" enctype="multipart/form-data">
<input type=file name=file size=25><br>
<button name="upload" type="submit">Upload</button>
</form>
<?
if(isset($original))
{
echo "Vorschau<br><br>Thumbnail &raquo; <i>".$smallimage."</i><br><img src=".$smallimage."><br><br& gt;Original &raquo; <i>".$original."</i><br><img src=".$original.">";
}
?>
</body></html> |