(06-13-2013, 09:16 AM)abdilahrf Wrote: if(isset($_FILES['upload']['name'])){ pake isset biar indexnya gk langsung keluar tapi ane upload file php kok gak gagal :v pas ane cek type nya gak kedetect php malah kedetek octet-stream padahal file yang ane upload .php
<? if(isset($_FILES['upload']['name'])){ $mime = $_FILES['upload']['type']; if($mime == "image/jpeg" || $mime == "image/png"){ if(move_uploaded_file($_FILES['upload']['tmp_name'],basename($_FILES['upload']['name']))){ echo "Upload succes, filename : ".basename($_FILES['upload']['name']); } else { echo "Upload failed, maybe you forget to chmod your folder to 777 so i can upload this file directory directory :'("; } } else { echo "Sorry dude, but that filetype not allowed :ROFL:"; } } else { echo " Jpg Png Only!<br> <form method=post enctype=multipart/form-data> <input type=file name=upload> <input type=submit value=upload> </form>"; }?>
_/_/_/_/_/ _/ _/_/_/ _/_/ _/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/
(06-14-2013, 03:55 PM)TMPX Wrote: pake tamper data mungkin :-? :-?
(06-14-2013, 03:34 PM)areoid Wrote: modif aja header nya sukses lah hasil uploadnya eh kok headers, maksudku modif paramerter nya -_-
(06-14-2013, 05:01 PM)alkaaf Wrote: (06-14-2013, 03:34 PM)areoid Wrote: modif aja header nya sukses lah hasil uploadnya eh kok headers, maksudku modif paramerter nya -_- =))=)) wah kok terlalu mudah y kynya, wkwkwk gpp lah. nambah ilmu dikit.