Intro:So, with that said, maybe neither the iPhone nor Android will prevail in the smart phone wars in the long run. Although Blackberry has been dramatically loosing market share since the iPhone and Android’s introduction into the market, maybe Blackberry’s eye for security will help make a comeback for their lagging sales and falling market share. Blackberry’s OS has been proprietary since the start and with their new OS6 touted as being the safest smart phone OS available to date; maybe there still is a chance for blackberry to make a comeback. That is of course if in deed Blackberry OS6 is the safest smart phone OS available. Although, through my research, I have found that blackberry is also vulnerable to most security issues that plague Android and iPhone.
Dalam urusan upload file, biasanya ukuran file telah dibatasi oleh server .Kita juga bias mengeceknya pada file php.ini atau melalui phpinfo.php pada bagian post_max_size.
Script upload_max.php
<?php
$lokasi_file = $_FILES['fupload']['tmp_name'];
$nama_file = $_FILES['fupload']['name'];
$ukuran_file = $_FILES['fupload']['size'];
// Jika ukuran file > ukuran maksimal file
if ($ukuran_file > $_POST[ukuran_maks_file]){
echo "Upload Gagal !!! <br>
Ukuran file <b>$nama_file</b> : $ukuran_file bytes<br>
Ukuran file tidak boleh > 1000000 bytes (1 Mb) <br>";
}
else{
$direktori_file = "files/$nama_file";
move_uploaded_file($lokasi_file,"$direktori_file");
echo "Nama File : <b>$nama_file</b> berhasil di upload <br>";
echo "Ukuran File : <b>$ukuran_file</b> bytes";
// Masukkan informasi file ke database
mysql_connect("localhost","root","");
mysql_select_db("dbphp");
$input="INSERT INTO upload_file(nama_file,ukuran_file,deskripsi,direktori)
VALUES('$nama_file','$ukuran_file','$deskripsi','$direktori')";
mysql_query($input);
}
?>
Pertama tama jalankan form_upload yanmg telah di rubah actionnya menjadi upload_max.php.Akan muncul pesan error jika file yang di upload lebih dari 1MB.