brown adlı üyeden alıntı: mesajı görüntüle
index.html:
<form action="yukle.php" method="post" enctype="multipart/form-data">

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Dosya Sec</td>
<td>:</td>
<td><input type="file" name="dosya" size="20"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type="submit" value="Yukle"></td>
</tr>
</table>
</form>
yukle.php
<center style="margin-top:100px;font-family:trebuchet ms;font-size:13px;">
<form action="yukle.php" method="post" enctype="multipart/form-data">

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Dosya Sec</td>
<td>:</td>
<td><input type="file" name="dosya" size="20"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type="submit" value="Yukle"></td>
</tr>
</table>

</form>


<div style="margin-top:100px;">
<?php

$kaynak = $_FILES["dosya"]["tmp_name"];
$dosyaadi = $_FILES["dosya"]["name"];
$dosyatipi = $_FILES["dosya"]["type"];
$dboyut	= $_FILES["dosya"]["size"];
$hedef = "resimler";

$uzanti	= substr($dosyaadi, -4);
$yeniad = substr(md5(uniqid(rand())), 0,10);
$yeniresimadi = $yeniad.$uzanti;


$yukle = move_uploaded_file($kaynak,$hedef.'/'.$yeniresimadi);

if($yukle){
echo "Dosya basariyla yuklendi<br>";

}else{
echo "Dosya Yuklenemedi<br>";

}

echo "Dosyanin geldigi yer: ".$kaynak."<br>";
echo "Dosyanin adi : ".$dosyaadi."<br>";
echo "Dosyanin tipi : ".$dosyatipi."<br>";
echo "Dosyanin boyutu :".$dboyut." byte.<br>";

?>
</div>
</center>
işinize yarayacaktır
teşekkürler hocam cok güzel olmuş ama tam olarak yapmak istedigim mesela abc.com diye bir
sitem var bu sitemin a klasöründe php dosyalar var ben bu dosyaların isimlerini yazıp isminiyazdıgım bu dosyaları efg.com sitemin ali klasörüne göndermek istiyorum bunu nasıl yapabilirim