#1 Re: Problémy s FTP » Problem s uploadom obrazkov » 2012-02-18 17:21:31

Aha uz to tma vidim big_smile.. ono sa to ukaze az ked sa odpojim os serveru a zas napojim big_smile ale dakujem

#2 Re: Problémy s FTP » Problem s uploadom obrazkov » 2012-02-18 16:33:26

Tak to vidis dobre..jak je mozne ze ja ich nevidim cez total commander na ftp v zlozke avatar? big_smile

#3 Re: Problémy s FTP » Problem s uploadom obrazkov » 2012-02-18 14:53:58

To je dost divne.. ale mne sa to fakt nenachadza v tej zlozke aj ekd to pise ze uz to tam raz je .. oc s tym spravim sakra big_smile

#4 Re: Problémy s FTP » Problem s uploadom obrazkov » 2012-02-17 20:54:54

<form action="upload_avatara.php" method="post"enctype="multipart/form-data">
<label for="file">Názov avatara :</label>
<input type="file" name="file" id="file" />
<br>
<input type="submit" name="submit" value="Upload" />
</form>
<?php

if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/pjpeg"))
&& ($_FILES["file"]["size"] < 2000000))
  {
  if ($_FILES["file"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file"]["name"] . "<br />";
    echo "Type: " . $_FILES["file"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";

    if (file_exists("avatar/" . $_FILES["file"]["name"]))
      {
      echo $_FILES["file"]["name"] . " already exists. ";
      }
    else
      {
      move_uploaded_file($_FILES["file"]["tmp_name"],
      "avatar/" . $_FILES["file"]["name"]);
      echo "Stored in: " . "avatar/" . $_FILES["file"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }

?>

#5 Re: Problémy s FTP » Problem s uploadom obrazkov » 2012-02-17 18:55:43

Mam urobeny upload obrazkov v php.. pri  vlozeni obrazka vypise ze  bol presunuty obrazok do zlozky na FTP ale v tej zlozke nic nie je povolil som chmod na 777 a stale nic..ked dam znova ten isty obrazok uploadnut vypise ze uz tam taky je aj ked nie je.. je tu zakazany upload ci ako?

#6 Re: Pravidla a oznámení » Vypadek MySQL serveru 2 » 2012-01-22 00:14:03

Asi pol hodinu je tento problem. Len biela stranka sa zobrazuje.

Zápatí

Založeno na FluxBB | CZ a SK