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>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.