swampone
(Shawnsonnier04)
1
Im trying to resize an image. I can just display the image like so:
<?php
$images = '/galleries/1/pictures/'.$image->cover;
echo CHtml::image($images);
?>
But when i try to resize it, I get No such file or directory at getimagesize()
<?php
$images = '/galleries/1/pictures/'.$image->cover;
$img = Yii::app()->simpleImage->load($images);
$img->resizeToWidth(128);
$img->output();
?>
rookie84
(Lifeline Is)
2
Try a full url maybe? /galleries/1/pictures whats the location of this?
You may try: <?php echo Yii::getPathOfAlias(‘webroot’); ?>/galleries/1/pictures in case the galleries/ directories is in the webroot?