title: php foreach and glob() function
body: <p>PHP versione 5.2.*</p>
  
  <p>my function not working :/</p>
  
  <p>images in server, in folder: /public_html/gallery/images</p>
  
  <p><img src="https://www.upload.ee/image/3659079/pilt1.jpg" alt="images in server"></p>
  
  <pre><code>&lt;?php
      foreach(glob('gallery/images/*', GLOB_NOSORT) as $image)   
      {  
          echo "Filename: " . $image . "&lt;br /&gt;";      
      }  
  ?&gt;
  </code></pre>
  
  <p>any help? what im doing wrong? </p>
  
  <p>error i get is : Warning: Invalid argument supplied for foreach() in /home/a9773555/public_html/gallery/index.php on line 2</p>