Para este script que crea directorios en mi servidor mediante un formulario, Muchas gracias.
Código PHP:
<?php
$id_con = ftp_connect("localhost");
$nombre_usuario_ftp="edgar2";
$contrasenya_ftp="mypass";
$path="/";
$path.=$dir;
$resultado_login = ftp_login($id_con, $nombre_usuario_ftp, $contrasenya_ftp);
$res=ftp_mkdir($id_con,$path);
ftp_close($id_con);
if($res)
{
echo "<div align=center><h1>Se ha creado con exito</h1>";
}
else {echo "<div align=center><h1>No se ha podido crear</h1>";}
?>
<form method="post">
<label>
<input type="text" name="dir" />
</label>
<label>
<input type="submit" value="Crear" />
</label>
</form>
Código PHP:
Warning: ftp_mkdir() [function.ftp-mkdir]: Directory already exists in D:_rootAppServwwwscriptscrearfoldercrear.php on line 8