Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/02/2013, 16:06
Avatar de VencerNow
VencerNow
 
Fecha de Ingreso: noviembre-2010
Ubicación: Mexico D.F.
Mensajes: 27
Antigüedad: 13 años, 5 meses
Puntos: 1
Pregunta Problema con explode

Hola buenas tengo un problema de logica y le eh modificado todo el presunto daño que puediese presentar pero no doy

Error:
Código Error:
Ver original
  1. Notice: Undefined variable: tipo in C:\wamp\www\proyecto\subearchivo.php on line 17
  2.  
  3. Warning: explode() expects parameter 3 to be long, string given in C:\wamp\www\proyecto\subearchivo.php on line 17

Si pudiesen ayudarme porfavor ya tengo mas de 2 dias pegado en el ordenador.
Este es el codigo:
Código PHP:
<?php
 
if ($_POST)

{

 
$str "ABCDEFGHIJKLMNOPQESTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
 
$cad "";
 
define('separador',DIRECTORY_SEPARATOR);
 for (
$i=0;$i<12;$i++) 
 {
 
$cad .= substr($str,rand(0,62),1);
 }
 
 
$tamano $_FILES'file' ][ 'size' ];
 
$tamano_max="5000000";
 if( 
$tamano $tamano_max){
 
$destino 'uploaded' ;
  
$sep=explode('image/'$_FILES'file' ]['tmp_name'], $destino separador $cad'.' $tipo);
 
$tipo=$sep;
 if(
$tipo == "gif" || $tipo == "jpeg" || $tipo == "gif" || $tipo == "bmp" || $tipo == "pdf"){
 
move_uploaded_file ($_FILES'file'][ 'tmp_name' ], $destino '/' $cad '.' $tipo);
 include(
'post.html');
}}}
?>