PHPverse 2025

Voting

: three minus two?
(Example: nine)

The Note You're Voting On

hope at it-helps dot com
14 years ago
Create an image resource from file, without knowing image type:

<?php
function imagecreatefromfile($imagepath=false) {
if(!
$imagepath || !$is_readable($imagepath) return false;
return @
imagecreatefromstring(file_get_contents($imagepath));
}
$img_resource=imagecreatefromfile($imagepath);
?>

<< Back to user notes page

To Top