title: Php move files strange bug
body: <p>I'm facing a strange bug that I can't find words to describe !<br />
  When I use <code>move_uploaded_file</code> function with this path "/Project/Uploads/Imgs/"<br />
  When I use the same function with this path "/opt/lampp/htdocs/Project/Uploads/Imgs/"
  It works normally !<br /></p>
  
  <p><strong>My code</strong></p>
  
  <pre><code>$avatar         = $_FILES['avatar'];
  $avatarName     = filter_var($avatar['name'], FILTER_SANITIZE_SPECIAL_CHARS);
  $avatarTmp      = $avatar['tmp_name'];
  $randomAvatar   = rand(0,1000000000) . "_" . $avatarName;
  move_uploaded_file($avatarTmp, $uploads . $randomAvatar);
  </code></pre>
  
  <p>While Variable <code>$uploads</code> = the path</p>
  
  <p>Another bug,<br />
  Every time PHP moves the file into the uploads folder, I've to make chown from the linux terminal with sudo permissions to make it readable</p>