Ver Mensaje Individual
  #9 (permalink)  
Antiguo 25/02/2010, 19:39
apustilnik
 
Fecha de Ingreso: septiembre-2009
Mensajes: 402
Antigüedad: 14 años, 7 meses
Puntos: 6
Respuesta: Subir imagenes mediante php

Aqui el codigo entero de la pagina sencillisima que creé para probar el codigo, y abajo, el error que me salta al visualizar la pagina en el navegador:
----------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<input type="file" name="file" />
<input type="submit" name="Submit" value="Submit" />
</form>
</body>
</html>
<?php
extract($_POST);

$imagen= $_POST['imagen'];

$uploadDir = 'IMAGENES/';
$uploadFile = $uploadDir . $_FILES['imagen']['name'];
move_uploaded_file($_FILES['imagen']['tmp_name'], $uploadFile);
chmod("IMAGENES/".$uploadFile, 0777);
$pagina= "http://www.globbal.com.ar/";
$ruta="http://www.tuweb.net/IMAGENES/".$uploadFile;

?>
-----------------------------------------------------------------------
Aqui el error que me muestra en el navegador:
-----------------------------------------------------------------------
Warning: chmod() [function.chmod]: No such file or directory in /www/globbal.com.ar/htdocs/SUBIR_ARCHIVO.php on line 23
---------------------------------------------------------------------
Que puede ser lo que estoy haciendo mal?