יש לי בעיה בקוד
אוקי זה ככה יש לי בעיה בקוד זה index.php case 'upfile': echo 1; if (is_array($_FILES["up"])) { echo 2; $i = count($_FILES["up"]['name']); echo " $i "; foreach ($_FILES["up"]['name'] as $kay=>$fdata) { if (!empty($_FILES["up"]['name'][$kay])) { echo 'z'; $types =array("image/gif","image/pjpeg","image/x-png"); if (!in_array($_FILES["up"]['type'][$kay],$types)) { echo 'good'; echo $lid.'-'.$pid; $GLOBALS['fsys']->size = $_FILES["up"]['size'][$kay]; echo $GLOBALS['fsys']->size; $path = $_SERVER['DOCUMENT_ROOT']."/lines/".getfpath($lid,$pid); echo $path; $fdata = array( 'name' => $_FILES["up"]['name'][$kay] , 'type' => $_FILES["up"]['type'][$kay] , 'tmp_name' => $_FILES["up"]['tmp_name'][$kay] , 'error' => $_FILES["up"]['error'][$kay]); if ($GLOBALS['fsys']->get_Info_File($fdata,$path,$lid,$pid) == true) { echo 'upload done'; } } } } } break; filesystem.inc.php class filesys { var $flk; var $x,$y,$size; var $type,$lid,$pid; var $curfile,$fname; var $hash,$count,$htmlcount; var $htmlcode = "<html><body>"; var $htmlname = array(); function get_Info_File($file,$path,$lid,$pid) { $this->lid = $lid; $this->pid = $pid; $GLOBALS['uid'] = 1; $tpath = $path .'/'.$file['name']; move_uploaded_file($file['tmp_name'],$tpath); echo $size = getimagesize($tpath); $this->x = $size[0]; $this->y = $size[1]; /*$this->hash = $this->makehash($this->pid,$this->lid,$size);*/ $id = $this->enter_data_img($this->size,$tpath,$file['name']); $this->addpic($tpath,$type); $this->makehtml(); return true; } function addpic($tpath,$type) { static $i = 0; echo 1; if ($i ==20) { $this->makehtml(); $this->htmlcode = "<html><body>"; $i = 0; echo 2; } else { while ($this->count<=3) { echo 3; if ($this->count == 3) { echo 4; $this->htmlcode .="<br>"; $this->count=0; }
אוקי זה ככה יש לי בעיה בקוד זה index.php case 'upfile': echo 1; if (is_array($_FILES["up"])) { echo 2; $i = count($_FILES["up"]['name']); echo " $i "; foreach ($_FILES["up"]['name'] as $kay=>$fdata) { if (!empty($_FILES["up"]['name'][$kay])) { echo 'z'; $types =array("image/gif","image/pjpeg","image/x-png"); if (!in_array($_FILES["up"]['type'][$kay],$types)) { echo 'good'; echo $lid.'-'.$pid; $GLOBALS['fsys']->size = $_FILES["up"]['size'][$kay]; echo $GLOBALS['fsys']->size; $path = $_SERVER['DOCUMENT_ROOT']."/lines/".getfpath($lid,$pid); echo $path; $fdata = array( 'name' => $_FILES["up"]['name'][$kay] , 'type' => $_FILES["up"]['type'][$kay] , 'tmp_name' => $_FILES["up"]['tmp_name'][$kay] , 'error' => $_FILES["up"]['error'][$kay]); if ($GLOBALS['fsys']->get_Info_File($fdata,$path,$lid,$pid) == true) { echo 'upload done'; } } } } } break; filesystem.inc.php class filesys { var $flk; var $x,$y,$size; var $type,$lid,$pid; var $curfile,$fname; var $hash,$count,$htmlcount; var $htmlcode = "<html><body>"; var $htmlname = array(); function get_Info_File($file,$path,$lid,$pid) { $this->lid = $lid; $this->pid = $pid; $GLOBALS['uid'] = 1; $tpath = $path .'/'.$file['name']; move_uploaded_file($file['tmp_name'],$tpath); echo $size = getimagesize($tpath); $this->x = $size[0]; $this->y = $size[1]; /*$this->hash = $this->makehash($this->pid,$this->lid,$size);*/ $id = $this->enter_data_img($this->size,$tpath,$file['name']); $this->addpic($tpath,$type); $this->makehtml(); return true; } function addpic($tpath,$type) { static $i = 0; echo 1; if ($i ==20) { $this->makehtml(); $this->htmlcode = "<html><body>"; $i = 0; echo 2; } else { while ($this->count<=3) { echo 3; if ($this->count == 3) { echo 4; $this->htmlcode .="<br>"; $this->count=0; }