linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] wrong in my sharing server


From: Roland Ohlsson
Subject: [Linphone-developers] wrong in my sharing server
Date: Fri, 2 Aug 2013 11:46:28 +0200

I tried to put up my own server, and if i am changing from userfile to file, and upload it from the web, it goes well, however, sending it from linphone isn't working unfortunatelly, here is my code to my sharing server:

<?php

function getExtension($str)
{
    $i = explode('.', $str);
    return strtolower(end($i));
}
if ($_FILES["userfile"]["error"] > 0)
  {
      return;
  }
else
  {
  $size = ($_FILES["userfile"]["size"] / 1024);
  if($size > 1000)
  {
     return;
  }
  $locdir = dirname(__FILE__);
  $globdir = "http://192.168.91.101/userdata";
 
  $uploaddir = '/images/' . date('Y-m-d') . '/';
  if (!is_dir($uploaddir)) {
    mkdir($uploaddir, 0777);        
  }
  $uploadfile  = $uploaddir . uniqid() . '.' . getExtension($_FILES["userfile"]["name"]);

  if (move_uploaded_file($_FILES['userfile']['tmp_name'], $locdir . $uploadfile))
  {
    echo $globdir . $uploadfile;
  }
}
?>

BR Roland

reply via email to

[Prev in Thread] Current Thread [Next in Thread]