note 116561 added to imagick.writeimage

From: Date: Thu, 22 Jan 2015 12:07:35 +0000
Subject: note 116561 added to imagick.writeimage
Groups: php.notes 
Request: Send a blank email to php-notes+get-201498@lists.php.net to get a copy of this message
<?php // Saves "example.jpg" in Apache's dir (that's why has no error) $im = new Imagick(); $im -> writeImage("example.jpg"); // Use instead the complete path: function file_path($file){ $path = explode("/",$_SERVER['DOCUMENT_ROOT'].$_SERVER['SCRIPT_NAME']); for($i=0 ; $i < (substr_count($file, '../')+1); $i++){ unset($path[count($path)-1]); } $path = implode("/",$path); $path = $path."/".$file; return str_replace(array('../','./'),'',($path)); } $im = new Imagick(); $im -> writeImage(file_path("example.jpg")); ?> ---- Server IP: 72.52.91.14 Probable Submitter: 190.216.29.126 ---- Manual Page -- http://php.net/manual/en/imagick.writeimage.php Edit -- https://master.php.net/note/edit/116561 Del: integrated -- https://master.php.net/note/delete/116561/integrated Del: useless -- https://master.php.net/note/delete/116561/useless Del: bad code -- https://master.php.net/note/delete/116561/bad+code Del: spam -- https://master.php.net/note/delete/116561/spam Del: non-english -- https://master.php.net/note/delete/116561/non-english Del: in docs -- https://master.php.net/note/delete/116561/in+docs Del: other reasons-- https://master.php.net/note/delete/116561 Reject -- https://master.php.net/note/reject/116561 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201498) next »