every file should have the right to be where it wants to be
| From: | malte 'the bitch' fucks | Date: | Fri, 23 May 2003 12:02:34 +0000 |
| Subject: | every file should have the right to be where it wants to be | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-20060@lists.php.net to get a copy of this message | ||
Hi,
i'm writing a little File Managment Script. I've done all the file, dir
listings and you even can rename and delete files.
Now i want to implement a function which allows users to move files around.
Every user has a dir named after his id and infinite Subdirs under that.
PHP gives me this:
Warning: copy(filebase/1/images/test) [function.copy]: failed to create
stream: Permission denied in c:\htdocs\schedule\fileops.php on line 126
with this code
if($pfad)
{
if(@copy($afile, $pfad)) // afile =
'filebase/1/images/test/test22/verlauf3.jpg' & $pfad = 'filebase/1/images'
{
unlink($afile);
?>
<script language="javascript">
this.close();
</script>
<?
}
else
{
?>
<table cellspacing="3" cellpadding="3" width="100%"
border="1"
style="border-style: double; border-width: 4px;" bordercolor="<? echo
$color[0]; ?>" height="100%">
<tr>
<td align="center" >Datei '<? echo $afile; ?>'
konnte nicht
nach '<? echo $pfad; ?>' verschoben werden!</td>
</tr>
<?
}
}
i even tried to chmod every file while listing with 777
chmod($dir."/".$filename, "0777");
but the rights PHP shows me are 100666
thx for your time
diggn / malte / whatever