Parašė fearless· 2013 Sau. 12 19:01:14
#5
Nesuprantu,
<?php
if(isset($_POST['submit'])) {
if((!empty($_FILES["ufile"])) && ($_FILES['ufile']['error'] == 0)) {
$oldfilename = basename($_FILES['ufile']['name']);
$path = '/uploads';
$curtime = $_SERVER['REMOTE_ADDR'];
$test = time();
$filename = $test. "_" . $oldfilename;
if (isset($_POST['submit']) && !empty($_FILES["ufile"]) && move_uploaded_file($_FILES['ufile']['tmp_name'], "uploads/".time(). "_".basename($_FILES['ufile']['name']))) {
echo "ikelta.";
}
}
}
?>
<html>
<head>
<title>Failo ikelimas</title>
</head>
<body>
<form action="index.php" method="post" enctype="multipart/form-data">
Select file: <input name="ufile" type="file" /><br />
<input type="submit" name="submit" value="Upload" />
</form>
</body>
</html>
Jauciu visai grybauju.
Php nepatinka vien del tu visokiu zanklu, skliausteliu