|
|
#11 (permalink) |
|
Üyelik Tarihi: 10.07.2003
Yer: Melbourne
Yaş: 26
Mesaj: 182
|
Re: php ile form da nasıl image yüklenir?
en son uyguladigim kod ---------- <?PHP $file_dir ="../web_pictures"; move_uploaded_file($_FILES['fupload_name']['tmp_name'],$filedir."/".$_FILES['fupload_name']['name']); ?> <form enctype="multipart/from-data" action="<?PHP print $PHP_SELF?>" method="post"> <p>Picture name:<br> <input type="text" name="fupload_name"> <br> Your Picture:<br> <input type="file" name="fupload"> <br> <input type="submit"> </p> </form> -------------- ama halen calismiyor
__________________
Kartal Bora |
|
|
|
|
|
#12 (permalink) |
|
Üyelik Tarihi: 01.11.2000
Yer: İstanbul
Yaş: 27
Mesaj: 713
|
Re: php ile form da nasıl image yüklenir?
Şöyle yapman gerekiyor:
<?PHP $file_dir ="../web_pictures"; move_uploaded_file($_FILES['fupload']['tmp_name'],$filedir."/".$_FILES['fupload']['name']); ?> <form enctype="multipart/from-data" action="<?PHP print $PHP_SELF?>" method="post"> <p>Picture name:<br> <input type="text" name="fupload_name"> <br> Your Picture:<br> <input type="file" name="fupload"> <br> <input type="submit"> </p> </form>
__________________
life is better without braces |
|
|
|
|
|
#13 (permalink) |
|
Mesaj: n/a
|
Re: php ile form da nasıl image yüklenir?
Eğer dosyayı server a yazmak gibi bir problemin yoksa -çünkü bu gerekli- aşağıdaki kodlar istediğin şeyleri yapıyor. Bide herkes kopyalaya kopyalaya yazmış "multipart/form-data" olacağına "multipart/from-data" var kodlarda. Hatanız o da olabilir.
a.PHP ------------ <form enctype="multipart/form-data" action="x_y.PHP" method="post"> <input type="file" name="dosya"><br> <input type="submit"> </form> x_y.PHP ------------------ <? if(isset($dosya)) { $dizin = "$DOCUMENT_ROOT/klasorlerin"; $dosyaadi = $_FILES["dosya"]["name"]; if (is_uploaded_file($dosya)) { move_uploaded_file($dosya, "$dizin/$dosyaadi"); } else { echo "Foto Yükleme Başarısız"; } } ?> <image src=klasorlerin/"<?=$dosyaadi?>"> |
|
| Sponsorlu Bağlantılar | |
|
Zoque.Forum
Reklam
|
|
Zoque'a hoşgeldiniz!