Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/02/2013, 15:42
David1992
 
Fecha de Ingreso: febrero-2013
Mensajes: 17
Antigüedad: 11 años, 2 meses
Puntos: 2
Respuesta: No se crea la carpeta en php y javascript No se crea la carpeta al darle

Esque te lo han dejado muy claro, mira un ejemplo para que lo entiendas:

Cita:
<?php
$nombre = $_POST['name'];
if($nombre == "" or $nombre == "Introduce nombre"){
echo "El campo de nombre es obligatorio";
}elseif(file_exists(./$nombre)){
echo "La carpeta ya existe";
}else{
mkdir(./$nombre);
echo "Carpeta creada con exito";
};

?>


<!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=utf-8" />
<title>Documento sin título</title>
</head>

<body>
<from method="post" action="/creacarpeta.php">
<input type="text" value="Introduce nombre" name="name">
<input type="submit" value="Crear Carpeta">
</from>
</body>
</html>