note 65598 deleted from function.imagecreatefromgif by bjori

From: Date: Thu, 04 May 2006 11:10:21 +0000
Subject: note 65598 deleted from function.imagecreatefromgif by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-110510@lists.php.net to get a copy of this message
Note Submitter: christian at macbox dot no Reason: bad code ---- Simpel way to know if the file is gif or jpg. First eks: $image = "test.jpg"; if(substr($image, -3) == "jpg") { do something } Second eks: $image = "test.jpg"; if(substr($image, -3) == "jpg") { do something }elseif(substr($image, -3) == "gif"){ do something } Third eks: if(substr($uploadedFile['name'][$i], -3) == "jpg") { do something }

« previous php.notes (#110510) next »