Senin, 02 September 2013

PHP Indonesia - Facebook: Why I Can't restrict the jpg files?? what could be...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Creating iOS Games: Beginner Course

Marin Todorov teaches you how to create an iPhone game easily and simply using Cocos2d in this $99 online course.
From our sponsors
Why I Can't restrict the jpg files?? what could be...
Sep 2nd 2013, 14:32, by Arup Debnath

Arup Debnath 2:32pm Sep 2
Why I Can't restrict the jpg files?? what could be changed??

<?php
$temp = $_FILES["file"]["tmp_name"];
$name = $_FILES["file"]["name"];
$type = $_FILES["file"]["type"];

if($type == "image/jpg")
die ("Can't Be Uploaded As jpg Format!");

else if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br>";
}
else
{

echo "Upload: " . $_FILES["file"]["name"] . "<br>";
echo "Type: " . $_FILES["file"]["type"] . "<br>";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
move_uploaded_file ($temp,"upload/".$name);
}

?>

Fajar Khairil Amin 6:18pm Sep 2
try to die($type) before conditional check to look actual value

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar