Selasa



Upload file


";
echo "Nama File: $myfile_name
";
echo "Ukuran: $myfile_size bytes
";
echo "Tipe File: $myfile_type
";
if ( $myfile_type == "image/pjpeg" ) {
if ($myfile_size <= 102400 ) { list($width, $height) = @getimagesize("$myfile"); if ( $width <= 100 && $height <= 100 ) { copy ( $myfile, "$myfile_name") or die ("Couldn't copy"); echo "File anda telah sukses diupload"; } else { echo "Ukuran panjang dan lebar gambar terlalu besar"; } } else { echo "Ukuran file tidak boleh lebih dari 100Kb"; } } else { echo "File harus JPG!!"; } } ?>