Dear Friends
I did a page and its working a html editor with DHTML so I'm find ing picture in HTML code later I can upload it database ....
and when 6 mounth ago I'm using PHP 4.0.6 now I'm using 4.2.2.
6 mounth ago, I can upload all files and there are not any error. but now, when I want to try it, file size not equal
for example
for($i=0;$i<($str_sayac-1);$i++)
{
$f="ff".$i;
$fn="fileName".$i;
$ff=$$f;
$ff_dir = $$fn;
$ff_name = $f."_name";
$ff_name=$$ff_name; // dosya adý
$ff_size = $f."_size";
$ff_size=$$ff_size; // dosya boyutu
$ff_type = $f."_type";
$ff_type=$$ff_type; // dosya tipi
$ff_name = str_replace ("%20", " ", $ff_name); // dosya adý içindeki boþluk karakterleri düzenleniyor
$fn = str_replace ("\\", "\", $$fn); // - \ karakteri düzenleniyor
$gun_e = date(d);
$ay_e = date("m");
$yil_e = date(Y);
$bugun = $yil_e.$ay_e.$gun_e; // tarih düzenleniyor
$data = addslashes(fread(fopen($ff, "r"), filesize($ff))); // upload edilen dosya temp ten okunup düzenleniyor
$count_of = strlen($data);
$sonuc = mysql_db_query($dbname,"SELECT FROM dosyalar WHERE data='$data'");
$sayac = mysql_num_rows($sonuc); // ayni dosyadan daha önce upload edilmiþmi ?
echo $sayac;
if ($sayac < 1)
{ // Bu dosya ilk kez yükleniyor
$sorgu = "INSERT INTO dosyalar (dosya_adresi,dosya_adi,data,boyutu,tip,user,date) VALUES ('$ff_dir','$ff_name','$data','$ff_size','$ff_type','$user','$bugun')";
echo $sorgu;
$result=MYSQL_QUERY($sorgu);
$sorgu = "SELECT FROM dosyalar WHERE data='$data'";
$sonuc = mysql_db_query($dbname,$sorgu);
$sayac = mysql_num_rows($sonuc);
}
$satir = mysql_fetch_array($sonuc);
$id_r= $satir[id];
}
this script open a file from temp and put it in a database also $count_of variable is equal 500. but I know file lenght 6kb so it must be 6000 and $ff_size is true.in data base only writing this"ÿØÿàJFIFÿÛC "
and question ;
is it my PHP problem (in php.ini upload_max_filesize = 2M )
is it my explorer or IIS problem ?
what is wrong.
sorry for my bad english. If you want please write from ICQ 55168417