Foros del Web » Programando para Internet » PHP »

Problema con SWF

Estas en el tema de Problema con SWF en el foro de PHP en Foros del Web. Hola, No sé porque cuando subo un archivo SWF en mi web no se me sube :S Pero no me sale ningun error :S Aqui ...
  #1 (permalink)  
Antiguo 31/08/2007, 06:49
 
Fecha de Ingreso: agosto-2007
Mensajes: 11
Antigüedad: 16 años, 7 meses
Puntos: 0
Exclamación Problema con SWF

Hola,
No sé porque cuando subo un archivo SWF en mi web no se me sube :S
Pero no me sale ningun error :S
Aqui les adjunto todo el código fuente:
Código PHP:
<?php 
$varrand 
substr(md5(uniqid(rand())),0,5);        
$varallw = array("image/bmp","image/gif","image/jpeg","image/pjpeg","image/png","image/x-png","image/tiff""image/x-icon""application/x-shockwave-flash");
$varpath "http://imageshare.iespana.es/tmp/";
$varstat "";

if (
$_POST["action"] == "upload") {
    if (
is_uploaded_file($_FILES["archivo"]["tmp_name"])) {
        
$varname $_FILES["archivo"]['name'];
        
$vartemp $_FILES["archivo"]['tmp_name'];
        
$vartype mime_content_type($vartemp);
        
        if (
in_array($vartype$varallw) && $varname != "") {
            
$varname $varrand.".".$varname;
            if (
copy($vartemp"tmp/".$varname)) {
                
$varpath $varpath.$varname;

                
$varstat "ok";
            } else {
                
$varstat "Error al subir el archivo";
            }
        } else {
            
$varstat "Archivo no valido";
        }
    }
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>ImageShare</title>
<link href="cssupload.css" rel="stylesheet" type="text/css" />
<LINK REL="SHORTCUT ICON" HREF="/images/favicon.ico">
</head>
<body>
<table width="420" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="413" height="40" class="titulo">ImageShare</td>
  </tr>
  <tr>
    <td class="text">Aloja gratuitamente tus imagenes con ImageShare:</td>
  </tr>
  <tr>
  <form action="pruebas.php" method="post" enctype="multipart/form-data">
    <td height="50" valign="top" class="text">
      <input name="imagen" type="file" class="casilla" id="imagen" size="35" />
      <input name="enviar" type="submit" class="boton" id="enviar" value="Upload Image" />
      <input name="action" type="hidden" value="upload" />      </td>
    </form>
  </tr>
  <?php if ($varstat == "ok") { ?>
  <tr>
    <td class="textinf"><p><strong>Confirmaci&oacute;n:</strong><br>
      Archivo publicado satisfactoriamente. Puedes utilizar las siguientes opciones para enlazarlo:<br>
      <strong>Enlace Directo: <br>
      <input name='txt1' type='text' value='<?php echo $varpath?>' size='60'>
      </strong><br>
      <strong>Enlace Para los Amigos:</strong><br>
      <input name='txt2' type='text' value=' size='60'>
      <strong>Enlace HTML:</strong> <br>
        <input name='txt3' type='text' value='' size='60'>
        <br>
        <strong>Código Foros:</strong>
        <strong>
        <input name='txt4' type='text' value='' size='60'>
        <br>
        Código Foros 2:</strong><br>
        <input name="txt5" type="text" value"" size="60">
      </p>    </td>
  </tr>
  <?php } else { ?>
      <?php if ($varstat != "") { ?>
      <tr>
        <td class="textinf"><strong>Error:</strong><br>
        <?php echo $varstat?>&nbsp;</td>
      </tr>
      <?php ?>
  <?php ?>
</table>
<?php if ($varstat == "ok") { ?>
<p align="center"><img src="tmp/<?php echo $varname?>"></p>
<p align="center"><EMBED pluginspage="http://www.macromedia.com/go/getflashplayer" src="tmp/<?php echo $varname?>" type="application/x-shockwave-flash" quality="high"></p>
<?php ?>
<?php 
if ($_GET['image'] != "") { ?>
<p align="center"><img src="tmp/<?php echo $_GET['image']; ?>"></p>
<p align="center"><EMBED pluginspage="http://www.macromedia.com/go/getflashplayer" src="tmp/<?php echo $_GET['application']; ?>" type="application/x-shockwave-flash" quality="high"></p>
<?php ?>
</body>
</html>
  #2 (permalink)  
Antiguo 31/08/2007, 07:34
Avatar de nicolaspar  
Fecha de Ingreso: noviembre-2004
Ubicación: Villa Ballester Bs-As|Ar
Mensajes: 2.002
Antigüedad: 19 años, 5 meses
Puntos: 34
Re: Problema con SWF

Puede que tu swf no tenga el content type que esperas o mil cosas más, pero intenta imprimir en pantalla la variable $vartemp para ver que tiene ese swf especifico.
Sino fijate que condición no pasa, como? haciendo diferentes echos entre las mismas.
__________________
Mi punto de partida es Que Bueno Lo Nuevo
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 14:02.