Ես եմ թեման բացել ես ել հարցնեմ ուրեմն հավաքել եմ մի սկրիպտ, որը ֆայլերը քցում է սրվեր.
PHP կոդ:
<html>
<head>
<title>Uploading Files Beta Version</title>
</head>
<body>
<?
include "config.php" ;
if($HTTP_POST_FILES["filename"]["size"] > 1024*200*1024)
{
echo("You have selected upper than 200mb file.");
exit;
}
if($HTTP_POST_FILES["filename"]["size"] < 1024*1*1024)
{
echo("You have selected small than 1mb file.");
exit;
}
if(copy($HTTP_POST_FILES["filename"]["tmp_name"], "upfiles/".$HTTP_POST_FILES['filename']['name']))
{
echo("File is uploaded sucessfully!<br>");
echo("<b>File Name: </b>");
echo($HTTP_POST_FILES["filename"]["name"]);
echo("<br><b>Link To Download: </b>");
echo("$mysite/uploads/$link");
echo("<br><b>File Type: </b>");
echo($HTTP_POST_FILES["filename"]["type"]);
}
else
{
echo("Error while uploading files!");
}
?>
</body>
</html>
Ու երբ ցանկացաց չափի ֆայլ եմ քցում ասում է "You have selected small than 1mb file."
Խնդրում եմ օգնեք, ինչ անեմ?
Էջանիշներ