Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Atidarys tik suvedus...

Parašė adulis· 2008 Bal. 6 13:04:13
#4

Aciu gugi,
dar viena bedelė
Kaip padaryti kad leistū dėti ir .rar failus štai kodas:
        <?php
if (($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/png")
|| ($_FILES["file"]["type"] == "image/jpg")
&& ($_FILES["file"]["size"] < 142000))
{
if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Pavadinimas: " . $_FILES["file"]["name"] . "<br />";
echo "Tipas: " . $_FILES["file"]["type"] . "<br />";
echo "Vieta: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
echo "Siuksles: " . $_FILES["file"]["tmp_name"] . "<br />";

if (file_exists("upload/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " Toks failo pavadinimas jau yra. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"" . $_FILES["file"]["name"]);
echo "<b>Nuoroda: " . "http://l2.ogline.net/failai/" . $_FILES["file"]["name"];
}
}
}
else
{
echo "";
}
?>




Bandžau
|| ($_FILES["file"]["type"] == "file/rar")

bet neleidzia ?|

Redagavo adulis· 2008 Bal. 6 13:04:31