title: Why php sorting my Images different on different Platforms
body: <p>This code does what it should on Xampp (Storting the images in a alphabetically order), but if i uploaded it on a Hosting service it randomly orders.</p>
  
  <p>I tried already natsort(); but maybe i implemented it wrong.
  I tried scandir but i doesent find the images (tried to change the path into the rootpath doesent worked either) </p>
  
  <pre><code>&lt;?php 
  $path = "./upload/outdoor/server/php/files/";
  $dh = opendir($path);
  $i=1;
  while (($file = readdir($dh)) !== false) {
    if($file != "." &amp;&amp; $file != ".gitignore" &amp;&amp; $file != "thumbnail" &amp;&amp; $file != ".." &amp;&amp; $file != "index.php" &amp;&amp; $file != ".htaccess" &amp;&amp; $file != "error_log" &amp;&amp; $file != "cgi-bin") {
      //Image Output
      echo "&lt;div&gt;
      &lt;div href='$path/$file'&gt;
      &lt;img src='$path/$file' /&gt;
      &lt;/div&gt;
      &lt;/div&gt;";
      $i++;}
    } 
  closedir($dh);
  ?&gt;
  </code></pre>