ag3nt42 Posted July 16, 2008 Share Posted July 16, 2008 i'm trying to get a list of all the files in a certain directory on my site and I keep getting this error: Warning: scandir(../downloads/updates) [function.scandir]: failed to open dir: Permission denied in xxx\downloads.php on line 24 Warning: scandir() [function.scandir]: (errno 13): Permission denied in xxx\downloads.php on line 24 here the code i'm trying to use: //FIND UPDATE FILES $Updates=scandir("../downloads/updates",1); $C_Updates=count($Updates); //DISPLAY HTML echo(" <div class='content'> <table width='100%'> <tr> <td><h1>Downloads</h1></td> </tr> <tr> <td> <table width='100%'> <tr> <td><h3>Full Updates</h3></td> </tr> <td>"); //LOOP TRHOUGH UPDATES for($x=0;$x<=$C_Updates;$x++) { echo("<br />" . $Updates[$x] . "<br />"); } echo(" </td> </tr> </table> </td> </tr> </table> </div> Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 16, 2008 Author Share Posted July 16, 2008 as far as I kno all the permissions are set up correctly.. read/write/create ect.. Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 16, 2008 Author Share Posted July 16, 2008 (bump!) Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 16, 2008 Author Share Posted July 16, 2008 (bump) Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 16, 2008 Author Share Posted July 16, 2008 thanks for the attempts everyone! lol jk jk I solved the issue tho.. i had to use opendir() to first open a stream to the directory.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.