sandrulis Posted October 7, 2012 Report Share Posted October 7, 2012 Sveiki, nomainot serveri ir radusies dīvaina kļūda :( pie augšuplādes netiek nodots faila nosaukums! agrāk, kad augšupladeju failu piemeram "fails_2012.zip", viss bija kārtibā, bet tagad tas fails tiek padots tālāk tikai tad, kad ir "fails2012.zip", cik noprotu visa problēma slepjās iekš "_" un iespējams uz citiem simboliem arī. Nevarat lūdzu apgaismot mani, kas vajadzētu izlabot vai kko pierakstit klāt kodam, lai viss būtu kā agrāk? Quote Link to comment Share on other sites More sharing options...
briedis Posted October 7, 2012 Report Share Posted October 7, 2012 Jāpaņem sava kristāla bumba, jāpalūr kāds tev tur tas kods... Quote Link to comment Share on other sites More sharing options...
sandrulis Posted October 7, 2012 Author Report Share Posted October 7, 2012 Jāpaņem sava kristāla bumba, jāpalūr kāds tev tur tas kods... $target_path = $target_path . basename($HTTP_POST_FILES['file']['name']); if(move_uploaded_file($HTTP_POST_FILES['file']['tmp_name'], $target_path)) Quote Link to comment Share on other sites More sharing options...
briedis Posted October 7, 2012 Report Share Posted October 7, 2012 Debugoji vismaz? Teiksim ar print_r($_FILES) Quote Link to comment Share on other sites More sharing options...
sandrulis Posted October 7, 2012 Author Report Share Posted October 7, 2012 (edited) visu laiku met ara "Notice: Undefined index" Edited October 7, 2012 by sandrulis Quote Link to comment Share on other sites More sharing options...
briedis Posted October 7, 2012 Report Share Posted October 7, 2012 Tad tā arī ir - nav definēts tas indekss masīvā. Parādi HTML, kas veic formas submitošanu. Vispār neesmu redzējis, ka kāds izmantotu $HTTP_POST_FILES, manuālī šīs masīvs ir deprecated, kas nozīmē, ka būtu jāizvairās no tā lietošanas. Iespējams, uz jaunā servera tas vairs neeksistē. http://php.net/manual/en/reserved.variables.files.php Quote Link to comment Share on other sites More sharing options...
Mr.Key Posted October 7, 2012 Report Share Posted October 7, 2012 print_r($HTTP_POST_FILES) abos gadījumos Quote Link to comment Share on other sites More sharing options...
sandrulis Posted October 7, 2012 Author Report Share Posted October 7, 2012 Tad tā arī ir - nav definēts tas indekss masīvā. Parādi HTML, kas veic formas submitošanu. Vispār neesmu redzējis, ka kāds izmantotu $HTTP_POST_FILES, manuālī šīs masīvs ir deprecated, kas nozīmē, ka būtu jāizvairās no tā lietošanas. Iespējams, uz jaunā servera tas vairs neeksistē. http://php.net/manua...ables.files.php <form method='post' action='' enctype='multipart/form-data'> <input type='file' name='file'> <input type='submit' value='Pievienot'> </form> izvilkts no koda, bet lieliem fragmentiem :) Quote Link to comment Share on other sites More sharing options...
malinens Posted October 7, 2012 Report Share Posted October 7, 2012 nomaini $HTTP_POST_FILES ar $_FILES Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.