I have a problem in PHP. I am using <input type=file>
to get the file name from the user.
Basically I want to store the just folder path and not the file, so that when I display the path using hyperlink, the user can open the directory.
Fakat <input type=file>
, kullanıcı bir dosyayı daha sonra sadece dosya metin kutusu dolu alacak seçmek zorundadır. Şimdi dosya adının son bölümünü kapalı şerit istiyorum.
Bunu nasıl yaparsınız? Ya da bu sorunu çözmek için daha iyi bir yolu var mı?
EDIT:
Ben adlı bir dosya 1.html diyelim ki böyle bir şey kullanıyorum:
<form method="post" action="update.php">
<input type="file" name="attachment" id="attachment"></td> </tr>
</form>
Şimdi, update.php ben böyle bir şey kullanıyorum:
$logpath1=$_POST['attachment'];
Basically I am getting the file name in $logpath1 that user selects. But the thing is input type = file will only work for files and not folders.
Yani, nasıl yoldan dosya şerit mi?
Örnek: kullanıcı seçerse,
C:\Documents and Settings\myusee\Desktop\new 2.cpp
I new 2.cpp
sökmek istiyorum.
Ben nasıl patlayabilir kullanabilirsiniz emin değilim. Ayrıca ben XAMPP Lite çalıştırıyorum.