0

I am trying to use phpThumb() which i downloaded from http://phpthumb.sourceforge.net in zend framework I like it the way it generates thumbnails and resized images. Its simple to use. I just need to add an image tag to generate image as defined width and height:

<img src="phpThumb.php?src=image.jpg&w=100"/>

I would like to use it in zend framework. If anybody is using it in zend framework, could you please show me the way to use it. Currently I m planning to place the phpThumb() library inside public folder and calling it as

<img src="public/phpThumb.php?src=image.jpg&w=100"/>

Is this a good idea? I would also like to know how good is it? What are the security holes if any?

rockstar
  • 1,322
  • 1
  • 20
  • 37

1 Answers1

0

In my projects I place phpThumb in library/Vendor/PHPThumb and just use:

$file = 'PATH_TO_FILE';
$thumb = Vendors_PHPThumb_Thumb::create($file);
$thumb->resize($width, $height)->save($file);

this will resize source file

Gtx
  • 231
  • 1
  • 10
  • 17