22 enero, 2011
Tutorial cargar o subir un archivo(imagen) en Php.
form1.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
</head>
<body>
<form action="subir.php" method="post" enctype="multipart/form-data" id="form1">
archivo
<label>
<input name="archivo" type="file" id="archivo" />
</label>
<label>
<input type="submit" name="Submit" value="Enviar" />
</label>
</form>
</body>
</html>
subir.php
<?php
$nombre_original = $_FILES["archivo"] ["name"] ;
$tipo = $_FILES["archivo"] ["type"] ;
$tam = $_FILES["archivo"] ["size"] ;
$temporal = $_FILES["archivo"] ["tmp_name"] ;
echo " nombre original : $nombre_original<br>";
echo " tipo de archivo : $tipo <br>";
echo " tamaño en bytes : $tam <br>";
echo " archivo temporal : $temporal <br>";
if(($tipo=="image/jpeg")or ($tipo=="image/pjpeg") or ($tipo=="image/gif")){
copy ($temporal,"archivos/$nombre_original");
}else {
echo "solo se permiten imágenes";
}
?>
20 enero, 2011
php y ajax
Este es un ejemplo de como utilizar xajax con conexión a base de datos MYSQL y PHP.
LO QUE HACE ES LISTAR GRUPO DE USUARIO,EDITAR, ELIMINAR Y CREAR.
CUALQUIER DUDA O AYUDA SOBRE EL CODIGO, YA SABES COMO CONTACTAR. AQUÍ SE LOS DEJO PARA QUE LO DESCARGUEN.
Your Download-Link:clase5 mas css.rar
http://www.fileshost.com/download.php?id=F1B9D3A31
Suscribirse a:
Comentarios (Atom)