Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Upload txt

Parašė adulis· 2008 Bal. 7 18:04:26
#16

O gal kas gali padaryti is sio kodo:
<?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 "Netinka formatas";
}
?>




Leistu deti visus failus arba bent .zip ir .rar

Redagavo WantedBoy· 2008 Bal. 7 21:04:09