note 40661 deleted from function.getimagesize by cmb

From: Date: Sun, 18 Dec 2016 09:45:42 +0000
Subject: note 40661 deleted from function.getimagesize by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208641@lists.php.net to get a copy of this message
Note Submitter: MarioPro ---- The Problem: I've just noticed that after upgrading to the PHP 4.3.4 version, the old GetImageSize() should get your attention on pages coded before this new version. The solutions: So, if you used GetImageSize(), you should now be using getimagesize() - attention to all lower caracters. Also, you shou certify that the image realy exists, otherwhise you'll get the following error: getimagesize(): Read error! This means that there is no image to "fill" the string and thus you're calling, for example: "images/news/" instead of calling "images/news/03102004a.jpg" One should now verify if there is an image to be called (example): if($photo1!=""){ $size1=getimagesize("images/news/".$photo_news_1"]); $width1=$size1[0]; $height1=$size[1]; } Here, if $photo_news_1 is set and exists it will be displayed, otherwhise it will be skiped and no ERROR message will be displayed. In the PHP 4.3.3 and earlier versions, this was not necessary but it is now! ;)

« previous php.notes (#208641) next »