ne dediğini anlamadım ama sql soruyorsan mariadb kullanıyorumüyelik yöntemi olarak ne kullanıyorsun öncelikle
ben kodları atacam şimdichmod değerlerinden olabilir mi ? 777 herkese açık istersen bir kontrol et yada auth sistemine bir bak.
<!-- index.php -->
<?php
session_start();
if (!isset($_SESSION['username'])) {
$_SESSION['msg'] = "You must log in first";
header('location: loginpage.php');
}
if (isset($_GET['logout'])) {
session_destroy();
unset($_SESSION['username']);
header("location: loginpage.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Anasayfa</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="header">
<h2>Anasayfa</h2>
</div>
<div class="content">
<!-- onay mesajı -->
<?php if (isset($_SESSION['success'])) : ?>
<div class="error success" >
<h3>
<?php
echo $_SESSION['success'];
unset($_SESSION['success']);
?>
</h3>
</div>
<?php endif ?>
<!-- kullanıcı bilgileri -->
<?php if (isset($_SESSION['username'])) : ?>
<p>Hoşgeldin <strong><?php echo $_SESSION['username']; ?></strong></p>
<p> <a href="index.php?logout='1'" style="color: red;">Çıkış yap!</a> </p>
<?php endif ?>
</div>
<form action="upload.php" method="POST" enctype="multipart/form-data">
<input type="file" name="file">
<button type="submit" name="submit">upload</button>
</form>
</body>
</html>
<!--index.php end-->
<!-- upload.php -->
<?php
if (isset($POST['submit'])){
$file = $_FILES['file'];
print_r($file);
$fileName = $_FILES['file']['name'];
$fileTmpName = $_FILES['file']['tmp_name'];
$fileSize = $_FILES['file']['size'];
$fileError = $_FILES['file']['error'];
$fileType = $_FILES['file']['type'];
$fileExt = explode('.', $fileName);
$fileActualExt = strtolower(end($fileExt));
}
?>
<!-- upload.php end -->
ya ayn ne allahım şaka gibisiniz raporlayında ban yesin valla boş boş yorum kasıyorlar
Concordo com voce, voce é fera meu amigoarkadaşlar okulumla birlikte bir proje geliştiriyorum ve tahmin ettiniz gibi ''Online Eğitim'' projesi.
herşey tamam üyelik sistemini falan hallettim uploaddı üyelikli yaptım üye olmadan atılmıyor
fakat uploadların yapıldığı /uploads/ klasörününe herkes erişebiliyor mantığım el vermiyor nasıl yapabilirim yardımcı olabilecek varsa.
yazarsa çok sevinirim *-*
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?