title: Problems with PHP and Ajax
body: <p>I'm sending an image with ajax, but in my .php file never enter to the function.
  If in the url, in ajax, I just write "xajax_publicar.php" and the log (FB::log("something")) I put this in the php file out of the fuction, this it shows in the console, but in the function, never enter there. </p>
  
  <p><strong>My JS</strong></p>
  
  <pre><code>function GuardarImagen(id)
  {
  var data = new FormData();
  jQuery.each(jQuery('#imagen1')[0].files, function(i, file) {
      data.append('imagen-'+i, file);
  });
  
      jQuery.ajax({
      url: 'xajax_publicar.php/GuardarImagen',
      data: data,
      cache: false,
      contentType: false,
      processData: false,
      type: 'POST',
      success: function(data){
          alert("Datos : " + data);
      },
      error: function (msg) {
          alert("Failed: " + msg.status + ": " + msg.statusText);
      }
  });
  </code></pre>
  
  <p>}</p>
  
  <p><strong>This is my PHP File</strong></p>
  
  <pre><code>function GuardarImagen()
  {
      try 
      { //Here i'm doing anything, FB LOG is a log in php
         $nombre  = $_FILES["imagen-0"]["name"];
  
         FB::log("In te function");   
         echo "Hola"; 
     } 
     catch (Exception $e) 
     {
  
      }
  }
  </code></pre>
  
  <p>I save first a "Publication", then I save Images and call the function in the JS from the same file php with xajax. This is my function that save "Publication".</p>
  
  <pre><code>function Publicar($titulo,$des,$noticia,$torneo,$jornada)
  {
      try 
      {
          $respuesta = new xajaxResponse();
          $funciones = new N_Publicacion();
          $objpublicacion = new EN_Publicacion();
          $iduser = $_SESSION["iduser"];
          if($torneo == 0)
          {
              $torneo = null;
              $jornada = null;
          }
          $objpublicacion-&gt;setTitulo($titulo);
          $objpublicacion-&gt;setDesc($des);
          $objpublicacion-&gt;setId_usuario($iduser);
          $objpublicacion-&gt;setIs_noticia($noticia);
          $objpublicacion-&gt;setId_torneo($torneo);
          $objpublicacion-&gt;setId_pro($jornada);
          $id_pbl = $funciones-&gt;Guardar($objpublicacion);
          if($id_pbl!= 0 || $id_pbl!=null)
          {
          $respuesta-&gt;call("GuardarImagen",$id_pbl);
          }
          else
          {
              $respuesta-&gt;call("Informar","- Ha ocurrido un problema al 
              publicar. Intente nuevamente.");
          }
          return $respuesta;
  
      } 
      catch (Exception $e) 
      {
  
      }
  }
  </code></pre>