Código PHP:
<?
function al($ext){
$f1=fopen("sabado.txt","r");
$lee = file("sabado.txt");
fclose($f1);
$leer = $lee[0] + 1;
$f1=fopen("sabado.txt","w+");
fwrite($f1,$leer);
fclose($f1);
$x=ftp_connect ("ftp.iespana.es",21);
if($x !=0){
echo "Conexión FTP activada<br>";
}else{
echo "No se activo lo conexión FTP";
}
if(ftp_login($x,"caca","toto")){
echo "El login y la password han sido aceptados <br>";
}else{
echo "Error en login o password<br>";
}
$name = $leer . "." . $ext;
if(ftp_put($x,$name,"$archivo",FTP_BINARY)){
echo "Transferencia exitosa<br>";
$f1=fopen("img.txt","a+");
$datos = "\t".$img."\t".$name."\r\n";
fwrite($f1,$datos);
fclose($f1);
}
ftp_quit($x);
}
if ($archivo != "none" AND $archivo_size != 0 AND $archivo_size<=$MAX_FILE_SIZE){
switch($archivo_type){
case 'image/gif':al($ext="img");
break;
case 'image/pjpeg':al($ext = 'jpg');
break;
case 'image/bmp':al($ext = 'bmp');
break;
default:echo ("guevon");
}
}
?>
Warning: error opening in C:\apache\htdocs\new.php on line 22,
bueno muchas gracias