
Ayuda php y xampp
Publicado por jokin1990 (1 intervención) el 06/04/2019 11:23:45
Buenos dias, el problema que tengo es que estoy haciendo un script emulando que subo archivos al servidor y cuando cargo la imagen a traves del navegador , no me la manda a la carpeta destino y ya no se que hacer, es que no si xampp no tuviera todos los permisos, no se
Saludos
Saludos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
if(isset($_POST['subir']) and !empty( $_FILES))
{
$destino='subidos/';
$nombre=$_FILES['archivos']['name'];
$tmp=$_FILES['archivos']['tmp_name'];
$tipo=explode('.',$nombre);
move_uploaded_file($tmp,$destino.$nombre);
echo "el archivo se ha subido de manera correcta";
}
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>subir archivos</title>
<link rel="stylesheet" href="../../formularios/css/bootstrap.min.css">
</head>
<body>
<form enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['$PHP_SELF']?>">
<input type="file" name="archivos">
<button type="submit" class="btn btn-primary"name="subir">Enviar</button>
</form>
</body>
</html>
Valora esta pregunta


0