Ver Mensaje Individual
  #12 (permalink)  
Antiguo 28/07/2008, 13:30
dannysoft
 
Fecha de Ingreso: julio-2008
Mensajes: 39
Antigüedad: 15 años, 9 meses
Puntos: 1
Respuesta: ayuda con codigo php

y en el subir le hice esto:


pdf_subir.php
Código PHP:
<!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=iso-8859-1" />
<title>::: Subir PDF  ::</title>
<link rel="stylesheet" href="estilo_deportes.css" type="text/css">
<link rel="stylesheet" href="estilo_noticias.css" type="text/css">
</head>

<body bgcolor="#FFFFFF">
<p class="texto_titulo">Subir Archivos PDF::</p>
<ol>
  <li><span class="texto_titulo">Nota:</span><br>
    <span class="texto_comentario">para subir pdf tener en cuenta el numero 
    de IP noticia, ejemplo: si e IPnoticia es 1, el PDF debe llamarse 1.pdf</span></li>
</ol>
<p>
  <?php
  select count
(*) as total from soporte
if ($enviar) {
move_uploaded_file($archivo,"pdf_soporte/$archivo_name");
$url "pdf_soporte/".$archivo_name;
chmod($url,0777);
echo 
"PDF subido exitosamente";

rename("/pdf_soporte/$nombre_del_archivo""/pdf_soporte/$total"."pdf"); 
}
else {
?>
</p>
<Form method="post" action="subir_pdf.php" enctype="multipart/form-data"> 
  <input type="file" name="archivo">
  <br>
  <input name="enviar" type="submit">
  <?php
}
?>

</body>
</html>

Última edición por dannysoft; 30/07/2008 a las 07:48