Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/05/2010, 08:46
jonnyalex_1990
 
Fecha de Ingreso: mayo-2010
Mensajes: 153
Antigüedad: 13 años, 11 meses
Puntos: 0
Exclamación Error al subir imagen

Hola a todos estoy super embalado con la subida de esta imagen si alguien me puede colaborar se lo agradeceria mucho.

Utilizo el siguiente codigo

<form action="jonny2.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<table width="200" border="1" align="center">
<tr>
<th scope="col">Imagen</th>
<th scope="col"><label>
<input type="file" name="imagen" id="imagen" />
</label></th>
<th scope="col">&nbsp;</th>
</tr>
<tr>
<td>&nbsp;</td>
<td><label>
<input type="submit" name="btnenviar" id="btnenviar" value="Enviar" />
</label></td>
<td>&nbsp;</td>
</tr>
</table>
</form>


<?php
if(isset($_POST['btnenviar']))
{
$tamano = $_FILES["imagen"]['size'];
$tipo = $_FILES["imagen"]['type'];
$nombre = $_FILES["imagen"]['name'];

$destino="../archivos/".$nombre;
if (copy($_FILES['imagen']['tmp_name'],$destino))
{
echo "Se ingreso correctmente";
}
else
{
echo "No se puedo ingresar";
}
}
?>

y me sale el siguiente error por que puede ser:


Warning: copy(../archivos/jonny.png) [function.copy]: failed to open stream: Permiso denegado in /opt/lampp/htdocs/sisco/cotizaciones/jonny2.php on line 9
No se puedo ingresar