Jump to content

[SOLVED] failed to open dir: Permission denied ? help!


ag3nt42

Recommended Posts

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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.