ето това е грешката :
Warning: copy(/lang_bulgarian.zip) [function.copy]: failed to open stream: Permission denied in /home/gamerbg2/public_html/map1n43/upload_ac.php on line 17
Беше открита грешка
а ето ги и 2та файла който използвам за ъплоад :
upload.php :
upload_ac.php :
Warning: copy(/lang_bulgarian.zip) [function.copy]: failed to open stream: Permission denied in /home/gamerbg2/public_html/map1n43/upload_ac.php on line 17
Беше открита грешка
а ето ги и 2та файла който използвам за ъплоад :
upload.php :
Код:
<?php ob_start(); session_start(); ?>
<body Text="#808080">
<?php
if($_SESSION['username'])
{
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251">
<meta name="dUn1" content="Subsworld Inc.">
</head>
<table width="100" border="0" align="center" cellpadding="0" cellspacing="1" >
<tr>
<form action="upload_ac.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<td>
<table width="517" border="0" cellpadding="3" cellspacing="1" >
<tr>
<td><b><center><FONT COLOR="#808080"> Избери файл които искаш да качиш</FONT></b></center><br>
<input name="ufile" type="file" id="ufile" size="60" /></td>
</tr>
<tr>
<td align="center"><input type="submit" name="Submit" value="Качи" class="buton" /></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
</center>
</body>
</html>
<?php
}
else
{
echo "за да качвате карти, моля <a href='register.html'>регистрирайте се</a>";
}
?>
upload_ac.php :
Код:
<meta http-equiv="refresh" content="5;url=index.php">
<BODY BGCOLOR="#000000" TEXT="#808080">
<?php
$dir=$_POST['dir'];
$file = $HTTP_POST_FILES['ufile']['name'];
$extensions = array("rar","zip");
$extension_file = end(explode(".",$file));
$extension_file = strtolower($extension_file);
if(!in_array($extension_file,$extensions)){
echo "Непозволен тип файл";
exit;
}
else {
$path= "$dir/".$HTTP_POST_FILES['ufile']['name'];
if($ufile !=none)
{
if(copy($HTTP_POST_FILES['ufile']['tmp_name'], $path))
{
echo "<b><font color=green>Файла е качен успешно :)</b></font><BR/>";
echo "Името на файла :".$HTTP_POST_FILES['ufile']['name']."<BR/>";
echo "Големината на файла :".$HTTP_POST_FILES['ufile']['size']."<BR/>";
}
else
{
echo "<b><font color=red>Беше открита грешка</b></font>";
}
}
}
?>